Thu 14 Jun 2007 11:31:44 AM UTC, comment #6:
I don't know which distribution of linux or if even linux you use, but most modern distributions like Debian or Gentoo uses following approach:
Let suppose you live in Italy, speaks Italian and preffers Unicode over 8bit charsets.
Then, as root, append into file /etc/locale.gen line
it_IT.UTF-8 UTF-8
and, still as root, run
locale-gen
The locale-gen command should "recompile" all definitions of all locales listed in /etc/locale.gen. Then command "locale -a" should print it_IT.UTF-8 too. Then export this locale using command "export LANG=it_IT.UTF-8" and in the same terminal after starting new program, it should talk to you italian (supposted the program has Italian translation).
|
Thu 14 Jun 2007 10:16:46 AM UTC, comment #3:
Mmm.. no occurrences of gnash.mo in the strace output.
These are the occorrunces of 'locale':
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5476] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 5476] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 5476] open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5476] open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5478] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 5478] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 5478] open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5478] open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5479] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 5479] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 5479] open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5479] open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5482] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 5482] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 5482] open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5482] open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5483] open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 5483] open("/usr/share/locale/locale.alias", O_RDONLY) = 3
[pid 5483] open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 5483] open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
open("/usr/lib/locale/it/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/it/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_LARGEFILE) = 4
open("/usr/lib/locale/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/it/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
Using the fallback 'C' locale.
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 4
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 4
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 4
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 4
|
Thu 14 Jun 2007 09:46:51 AM UTC, comment #2:
Use
$ strace -f -eopen gnash SWF_FILE 2>&1 |grep gnash.mo to track locations which gettext/glibc tries.
The bindtextdomain() processes second argument as a prefix. The postfix is calculated from LC_MESSAGES category (it usually fallbacks to value of $LANG). Complete path to binary catalog is "$LOCALEDIR/$LOCALE/LC_MESSAGES/$DOMAIN.mo". The $LOCALE part can be composed of $LANG, $TERITORY, $MODIFICATOR and $CHARSET. gettext library cascades $LOCALE value by cutting of $CHARSET, $MODIFICATOR and $TERITORY.
E.g. my locale is cs_CZ.UTF-8 and I intall gnash into PREFIX=/usr, therefore one of right possible location is /usr/share/locale/cs/LC_MESSAGES/gnash.mo.
|