1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

doc: describe how to choose the language (i18n) at run time

Removed the current section from 'INSTALL-WMAKER' and wrote an updated
chapter in the new README.i18n, to explain how the language is chosen at
run-time.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2015-01-20 22:04:00 +01:00
committed by Carlos R. Mafra
parent bd49dbc2f5
commit 1b0b2d7b1b
2 changed files with 60 additions and 22 deletions

View File

@@ -383,25 +383,3 @@ LOCALES/INTERNATIONALIZATION
Window Maker has national language support. The procedure to enable national Window Maker has national language support. The procedure to enable national
language support is described in the dedicated README.i18n file. language support is described in the dedicated README.i18n file.
4 - To select a particular locale at run-time you must set the LANG
environment variable to the locale you want. For example, if you want to set
the Portuguese locale, you must run
setenv LANG pt
in csh or
export LANG; LANG=pt
in Bourne sh and similar
Note: If you have the LC_CTYPE environment variable set, you must
unset it before running wmaker.
For menu definition files, Window Maker searches for them in the
following order (for Brazilian Portuguese, in this case):
menu.pt_BR
menu.pt
menu

View File

@@ -80,6 +80,7 @@ This manual is for Window Maker, version @value{version}.
@menu @menu
* Enabling Languages support:: How to compile Window Maker with i18n support * Enabling Languages support:: How to compile Window Maker with i18n support
* Choosing the Language:: When installed, how to run wmaker with your language
@end menu @end menu
@@ -127,5 +128,64 @@ Please note that if you also specify a value on the command line, it will have p
value in that file. value in that file.
@c ----------------------------------------------------------------------- Choosing the Language ---
@node Choosing the Language
@chapter Choosing the Language
If you have compiled and installed @sc{Window Maker} with support for your language,
the effective translation is done is the very same way as any other application on an @sc{Unix}
system, you just have to set the shell variable @env{LANG} to your language before @command{wmaker}
is started.
In @command{sh} type of shell (@sc{sh}, @sc{ksh}, @sc{bash}, ...), this is done for example with
(@code{fr} is for French):
@example
export LANG=fr
@end example
There is also a command line option @option{--locale} for @sc{Window Maker} which may be used to set
the language:
@example
wmaker --locale fr
@end example
When using this option, @sc{Window Maker} will use the locale you specified, redefining the
@env{LANG} environment variable to this value so all program started from @sc{Window Maker} will
inherit its value.
If your system is using @sc{systemd}, you can also configure the locale at system level using the
command:
@example
localectl set-locale LANG=fr
@end example
You can check if the current value is properly supported with the command:
@example
locale
@end example
If this does not work, you may need first to activate the support for your locale in the system;
you can get the list of currently enabled locales with the command:
@example
locale -a
@end example
You should be able to enable a new language support by editing the file @file{/etc/locale.gen} to
uncomment the locale(s) you need (by removing the @code{#} character and space(s) in front of it,
and by running the command @command{locale-gen} as root.
For further information, you may wish to read dedicated documentation, for example from
@uref{http://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html, the Linux Documentation Project}
or through pages like
@uref{http://www.shellhacks.com/en/HowTo-Change-Locale-Language-and-Character-Set-in-Linux,Shell Hacks' note on Changing Locale}.
@c ------------------------------------------------------------------------------------- The End --- @c ------------------------------------------------------------------------------------- The End ---
@bye @bye