diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/bash/locale-translation.html | |
new repository
Diffstat (limited to 'devdocs/bash/locale-translation.html')
| -rw-r--r-- | devdocs/bash/locale-translation.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/bash/locale-translation.html b/devdocs/bash/locale-translation.html new file mode 100644 index 00000000..ea1b652e --- /dev/null +++ b/devdocs/bash/locale-translation.html @@ -0,0 +1,6 @@ +<h1 class="subsubsection">Locale-Specific Translation</h1> <p>Prefixing a double-quoted string with a dollar sign (‘<samp>$</samp>’), such as <code>$"hello, world"</code>, will cause the string to be translated according to the current locale. The <code>gettext</code> infrastructure performs the lookup and translation, using the <code>LC_MESSAGES</code>, <code>TEXTDOMAINDIR</code>, and <code>TEXTDOMAIN</code> shell variables, as explained below. See the gettext documentation for additional details not covered here. If the current locale is <code>C</code> or <code>POSIX</code>, if there are no translations available, of if the string is not translated, the dollar sign is ignored. Since this is a form of double quoting, the string remains double-quoted by default, whether or not it is translated and replaced. If the <code>noexpand_translation</code> option is enabled using the <code>shopt</code> builtin (see <a href="the-shopt-builtin">The Shopt Builtin</a>), translated strings are single-quoted instead of double-quoted. </p> <p>The rest of this section is a brief overview of how you use gettext to create translations for strings in a shell script named <var>scriptname</var>. There are more details in the gettext documentation. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br> + <a href="https://www.gnu.org/software/bash/manual/html_node/Locale-Translation.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Locale-Translation.html</a> + </p> +</div> |
