You are here

ReadEnvStr $APPLANGUAGE

3 posts / 0 new
Last post
prapper
Offline
Last seen: 3 years 2 months ago
Developer
Joined: 2008-01-24 17:01
ReadEnvStr $APPLANGUAGE

If I have a load of language files called...

French.lng
German.lng
Italian.lng
etc.

wouldn't it be better if I could just...

ReadEnvStr $APPLANGUAGE "PortableApps.comName"

instead of...

ReadEnvStr $APPLANGUAGE "PortableApps.comLocaleglibc"

followed by all the

StrCmp $APPLANGUAGE "fr"
StrCpy $APPLANGUAGE "French"
etc.

?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
PortableApps.comLocaleWinName

You might like to try the environment variable PortableApps.comLocaleWinName. This produces things like LANG_ENGLISH, LANG_PORTUGUESE.

ReadEnvStr $0 PortableApps.comLocaleWinName
StrCpy $APPLANGUAGE $0 "" 5

$APPLANGUAGE will be e.g. ENGLISH, PORTUGUESE. If you find any instances where the PortableApps.comLocaleWinName is different, then you can do a StrCmp/StrCpy thing. Try LogicLib though, it's much easier:

${IfThen} $APPLANGUAGE == SPANISHINTERNATIONAL ${|} StrCpy $APPLANGUAGE Spanish ${|}

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

prapper
Offline
Last seen: 3 years 2 months ago
Developer
Joined: 2008-01-24 17:01
Thanks Chris, very helpful.

Thanks Chris, very helpful.

Log in or register to post comments