Localization |
Applies to Self-Extracting, HTML Viewer, IE Browser publications. HTML Executable provides localization support for your publications. Explanatory field text and dialog captions can display in the language of your choice when your publication is run. This tab allows you to manage the localization of your publication and to load/save language files.
Resource Strings
Imagine you want to build a publication both in French and English. Instead of translating all texts in the different fields, finding all options, actions, etc... you just need to modify a list of strings: this is the goal of the resource string editor. Resources strings can be invoked with the percent symbol % inserted before and after a constant: %SAbout%. These "string identifiers" take the place of string variables or literals. Publications replace each string identifier with its string value at runtime. You can also put resource strings directly in your HTML pages (see below).
To edit a resource string, just select it in the list and the editor will appear:
Modify the contents of the Value field, and press Apply to save the resource string's new value.
To add a resource string, click "Add String" and you will be prompted to enter the name for the new resource string. Its name should begin with a "S", have no space nor special characters (only alpha-numeric ones) and finally it should be unique. You can then edit the value of the new resource string and press Apply to finish.
How to put a resource string directly in your HTML page?This only works in HTML Viewer and IE Browser publications.
<!--#resstring ID="[name of the resource string]" --> Just replace the [name of the resource string] by the name of the resource string you want. For instance: SPubCopyright. <!--#resstring ID="SPubCopyright" --> The copyright text of the publication will be inserted in the HTML page.
<script language="Javascript"> If we follow the same example as above, this will lead to: <script language="Javascript"> The result of this script is here:
Strings for System HTML pages
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".
About 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/library/en-us/intl/nls_238z.asp 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.
Additional resource stringsSome resource strings are automatically created by HTML Executable when compiling your publication:
You can use these resource strings in your HTML pages and scripts. |