Skip to content

Localisation support

Roath04 edited this page Jul 26, 2017 · 4 revisions

Usage

Under the mobile/src/main/java/res/values/strings.xml folder you will find two strings resource files. These files contain tags and are identified by a name.

Here is an example:

<string name="preferences">Preferences: </string>.

Layout resources and other files and classes use these string resources by referencing the "name" of the string tag in the specific text value.

Here is an example of a string resource reference inside a layout resource file:

android:text="@string/preferences"

The @string references to the string resource file and the "preferences" references to the "name" that identifies a string tag.

Back in the string resource folder you will find another string resource file but here, the strings value is in Dutch:

<string name="preferences">Voorkeuren: </string>

NOTE: Make sure the "name" identification is the same in both string resource files.

On startup, the application will choose which string resource file to use based on your system language settings.

Clone this wiki locally