summaryrefslogtreecommitdiff
path: root/devdocs/bash/locale-translation.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/bash/locale-translation.html')
-rw-r--r--devdocs/bash/locale-translation.html6
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 &copy; 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>