Archive: Mix Arabic and English strings


Mix Arabic and English strings
Hi all,

NSIS newbie here. I've been given a script that supports English and Spanish and asked to add Arabic to it.

I inserted this line
!insertmacro MUI_LANGUAGE "Arabic"

and added Arabic strings to this section
LangString FAIL ${LANG_ENGLISH} "FAILED"
LangString PRODUCT_NAME ${LANG_SPANISH} "Product Name"

saved the NSI file as UTF-8, and found out the hard way that NSIS doesn't support Unicode script files.

This script is using several plugins and I am not NSIS expert. I really really don't want to switch over to Unicode NSIS.

Is there any way to add arabic strings to the installer script without switching over to Unicode NSIS? Maybe move them to a separate file saved with Arabic codepage?

thanks,
Sergey


You can store them with mixed code pages, but you won't be able to see both Arabic and Spanish at the same time - because their respective code pages simply don't contain all of the required characters (Arabic contains no Spanish accented letters, and the Western European code page doesn't contain any Arabic).

If you try to display text in the wrong code page, you'll get mojibake. That's probably going to be a problem - because at the very least, you probably need to show both for a language selection dialog.

I really think you should switch to Unicode NSIS now. You'll get a much better result out of it, and unless you stop updating NSIS entirely, you're going to have to do it eventually anyway, because as far as I can tell, they're actually integrating the Unicode changes now - so it looks like we may have seen the last ANSI release.

If you're concerned about plugins, then you could post which plugins you are using, and it'd be possible to see where you might experience problems.