Effortless Localization in IntraWeb 16.2.0

Starting from IntraWeb 16.2.0, a new built-in localization system makes it straightforward to translate IntraWeb internal resource strings to your own language without the need to write any code.

What’s New?

IntraWeb now includes built-in resource strings for 18 languages:

  • English (en)
  • German (de)
  • Spanish (es)
  • French (fr)
  • Italian (it)
  • Dutch (nl)
  • Polish (pl)
  • Portuguese (pt)
  • Portuguese (Brazil) (pt-br)
  • Russian (ru)
  • Ukrainian (uk)
  • Turkish (tr)
  • Thai (th)
  • Korean (ko)
  • Japanese (ja)
  • Indonesian (id)
  • Hindi (hi)
  • Chinese Simplified (zh-cn)

This covers all internal framework messages and the UI elements of Stand Alone servers, out of the box. 

Enabling Localization

To switch the language of all internal IntraWeb resources, set the HTMLLanguage property:

ServerController.HTMLLanguage := 'es'; // Example: Spanish

No additional configuration is required. IntraWeb will automatically use the correct resource set. Please notice that when using the built-in resource strings for any of the above languages, no external file needs to be distributed (either ini or resource file). All strings are stored internally in a resource, efficiently compressed so they don’t take significant space. 

Custom Translations

You can override the built-in resource string by placing a simple .INI file next to your executable.

File naming convention:

IWResourceStrings.<language code>.ini

Examples:

  • IWResourceStrings.es.ini
  • IWResourceStrings.pt-br.ini
  • IWResourceStrings.de.ini

Location:

  • Always in the same folder as the EXE (standalone apps) or DLL (ISAPI)

No registration or configuration is needed. The file is automatically detected at runtime as long as the file suffix matches the HTMLLanguage specified in your ServerController.

Ini file format

To customize messages in any language you just need to provide a ini file in the appropriate language. Example, in French:

IWResourceStrings.fr.ini

The content of the file follows regular .ini specs, all in a [Strigs] section:

[Strings]
<Resource string identifier>=<Text value>

No recompilation is required: just update the file and restart the application. The example template file in English can be obtained from our Github repository, here. You just need to give this template to any AI tool and get a new translation in your own language or a custom translation for your specific needs.

The translation also affects the UI of the Stand Alone server as you can see below, in French and in German:

             

 

That’s great, but I don’t want it localized…

Q: “I still want to have my HTML pages in my own language but I don’t want any localization, can I have the old behavior back?”

A: Yes, of course. In your ServerController.OnConfig event just use this:

TIWResourceStringManager.DisableLocalization := True;

and you will have the old bahavior back (every resource string using the default English and no INI file will be used during startup). You will need to reference unit IWResourceStrings in your uses clause.

Scroll to Top