Navigation: Learn About All Features > Application Behavior >
HTML Executable offers localization support for your publications and ebooks. It can display explanatory field text and dialog captions in your chosen language when your publication or ebook is run. This page guides you through managing the localization of your publication and loading/saving language files.
To alter the locale of certain internal menus or texts utilized by the HTML rendering engine, you can specify the desired locale thanks to the DefLocale property (e.g., 'en-us' for English, 'fr' for French, 'de' for German, and so forth).
Resource strings are specific string constants used to translate different messages and captions of user interface items such as menus, buttons, and window titles.
For instance, if you aim to build a publication in both French and English, you do not need to translate all texts in the different fields, find all options, actions, etc. Instead, you just need to modify a list of strings, which is the primary function of the resource string editor.
Resource strings can be invoked with the percent symbol `%` placed before and after a constant, like so: `%SAbout%`. These "string identifiers" replace string variables or literals. At runtime, publications substitute each string identifier with its corresponding string value.
You can also embed resource strings directly into your HTML pages (explained below).
To edit a resource string, simply select it from the list and an editor will appear:
Modify the contents of the Value field, then press Apply to save the new value of the resource string.
To add a resource string, click "Add String". You will be prompted to enter a name for the new resource string. This name should begin with an `S`, contain no spaces or special characters (only alphanumeric ones), and must be unique. You can then modify the value of the new resource string and press Apply to finalize.
To remove a resource string, select it and click Remove. Only resource strings that you added (user resource strings) can be removed.
document.write(window.external.GetString('[name of the resource string]'));
If we follow the same example as above, this will lead to:
These specific strings can only be used in Dialog Boxes to translate their titles and messages.
They can be invoked with the following syntax `[#ID]` where ID is the "string identifier". Such IDs always begin with `Y`; example: `[#YAbout]` will be replaced by the value of "YAbout" which is "About".
They are not available at runtime contrary to resource strings: all references to these strings are directly replaced when HTML Executable compiles the publication.
Managing these strings is exactly the same as for resource strings: see above.
You can import/export all strings from/to language files. These files are given the .hel extension. Use the Load/Save buttons to import or export language files.
Thus language files may be used in different publications. You can even share them with others.
Please update the properties of a language file if you plan to distribute it. Properties are only for informative purposes at this time, but this may change in the future. The locale number is the numeric "language identifier" of the language. Visit [http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx](http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx) for the list of available language identifiers.
Current strings are automatically saved in the project file, so you do not need to maintain a language file for your project.
Some resource strings are automatically created by HTML Executable when compiling your publication:
ØSPubTitle contains the title of your publication.
ØSPubHomepage contains the default homepage URL.
ØSPubAuthor contains the author name.
ØSPubCopyright contains the copyright of your publication.
ØSPubEMail contains the author E-Mail.
ØSPubVersion contains the version number of your publication, as defined in the Icon / Version tab.
ØSPubProductVer contains the product version number of your publication, as defined in the Icon / Version tab.
You can use these resource strings in your HTML pages and scripts.