[MPlayer-dev-eng] [PATCH] multi language part 2/2
Ötvös Attila
dc at chello.hu
Tue Dec 9 15:10:02 CET 2008
Hi All!
This patch support multi language in 1 binary file.
New parameters: -msglang <lang code>.
Default: set from LANG enviroment variables.
help/help_create.sh:
- change MSGTR_* -> to MSGTR_<lang code>_* in help_mp.h:
MSGTR_Enabled -> MSGTR_en_Enabled from help_mp-en.h
MSGTR_Enabled -> MSGTR_hu_Enabled from help_mp-hu.h
...
- build array from lang code: lang_code[]
{"en","hu","de", ... }
- build big array from messages: help_msg[msgid][langid]
(cols - language, rows - messages)
{MSGTR_en_Enabled,MSGTR_hu_Enabled,MSGTR_de_Enabled, ... },
create new MSGTR_*:
#define MSGTR_Enabled help_msg[144][langid]
and create new static defined:
#define MSGTR_STATIC_Enabled "###mpmsg###144###"
The mp_lang_translate() function (mp_msg.c) transate from "###mpmsg###144###"
to help_msg[144][langid] if need (use MSGTR_STATIC_*).
Best regards.
Attila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-multilanguage.patch
Type: text/x-diff
Size: 55736 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081209/715b3c3c/attachment.patch>
More information about the MPlayer-dev-eng
mailing list