简体   繁体   中英

How to edit/translate an Inno Setup .isl file

I'm trying to create Inno Setup .isl files that contains customized multilingual messages. But when I type in, say Chinese, in a .isl file and then compile the installer, the installer doesn't show my message in Chinese correctly, it shows random characters.

Upon inspecting the Unofficial .isl file for Chinese , I found that when I open that file in my text editor (sublime), it shows random characters, which are displayed correctly when running the installer.

Could it be due to the encoding of the files? Inno setup mentioned that there is a third party tool for editing .isl files, but unfortunately, the link is missing.

Any help is appreciated!

在此处输入图片说明

在此处输入图片说明

First, make sure you are using an Unicode version of Inno Setup . Do not use the "Ansi" version.


The .isl file has to use an Ansi encoding specified in its header:

[LangOptions]
LanguageName=<4E2D><6587><FF08><7B80><4F53><FF09>
LanguageCodePage=936

If you want to use UTF-8, use the .islu extension.

The .islu extension is not well documented, but perfectly working.
See also Is it safe to use .islu translation files in Inno Setup for all languages?

Quoting documentation of the LanguageCodePage directive :

Unicode Inno Setup LanguageCodePage:
LanguageCodePage specifies the "code page" (character set) needed for the compiler to convert the text in the language's .isl file to Unicode. Note that text in the .iss file such as a [CustomMessages] entry for the language is not converted and should be in Unicode already. If no code page currently exists for the language, set LanguageCodePage to 0, use a special .islu extension for the language's file, and encode this file as Unicode. Note: this makes your language file unusable by Non Unicode Inno Setup so only do this if really needed. ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM