-
Notifications
You must be signed in to change notification settings - Fork 4
Localization
Raphael Menges edited this page Mar 9, 2016
·
10 revisions
Localization is saved in a ".leyegui" file with UTF-8 encoding. Keys are used to map elements to entries.
SettingsHeader=Einstellungen
SettingsBackButton=Zurück
The path to the localization file is an optional parameter of the initial GUI creation with the GUIBuilder.
eyegui::GUIBuilder guiBuilder;
guiBuilder.localizationFilepath = "Localization/German.leyegui";
eyegui::GUI pGUI = guiBuilder.construct();
To use an entry as text content of an element, one has to use the same key in the localization file as in the elements "key" attribute. For example, the TextBlock displays text which can be defined in a localization file. One can create for each supported language one localization file with the same keys and different entries.