]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
locale.1: Provide a step-by-step example of how to use a custom locale
authorMarko Myllynen <myllynen@redhat.com>
Mon, 26 May 2014 08:28:34 +0000 (10:28 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 26 May 2014 08:28:34 +0000 (10:28 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man1/locale.1

index 407f7c8a9ee92a1608bb2ceff34ec9e14dccaf40..1bed28ddcd8efbc73058cde51b97eaf5cfe670bd 100644 (file)
@@ -167,6 +167,30 @@ yesstr="Yes"
 nostr="No"
 messages\-codeset="UTF\-8"
 .fi
+
+The following example compiles a custom locale from the
+.I ./wrk
+directory with the
+.BR localedef (1)
+utility under the
+.I $HOME/.locale
+directory, then tests the result with the
+.BR date (1)
+command, and then sets the environment variables
+.B LOCPATH
+and
+.B LANG
+in the shell profile file so that the custom locale will be used in the
+subsequent user sessions:
+
+.nf
+$ \fBmkdir -p $HOME/.locale\fP
+$ \fBI18NPATH=./wrk/ localedef -f UTF-8 -i fi_SE $HOME/.locale/fi_SE.UTF-8\fP
+$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date\fP
+$ \fBecho "export LOCPATH=\\$HOME/.locale" >> $HOME/.bashrc\fP
+$ \fBecho "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc\fP
+.fi
 .SH SEE ALSO
+.BR localedef (1),
 .BR locale (5),
 .BR locale (7)