Language Changer

$9
Publisher Game Alchemists
File size 99.92kB
Number of files 5
Latest version 1
Latest release date 2018-02-28 11:23:21
First release date 2018-02-28 11:23:21
Supported Unity versions 2018.4.2 or higher
The Language Changer allows to switch between different languages during the game. The script was made as simple as possible. Therefore it is appropriate for beginners, too. The Language Changer supports all text-based UI components. It also supports dropdowns. Not only the options will be translated but the current selection, too.

How it works: The Texts will be saved in an XML file and will be read out as strings.

Instruction step by step:

1. Create the UI object with it`s Text.

2. Mark the Text components, that are supposed to be translated, in the hierarchy with a star (*) at the end of the name.

3. Texts without a star will be ignored by the script.

4. There are three possibilities how to continue now. In every case all Text components with a star will be read by the script. Therefore an interface between the Text components and the XML file will be created.

4.1. A GameObject, that includes a Text component, are assigned to the script.

4.2. A group of GameObjects, that include Text components, are assigned to the script.

4.3. Dropdowns must be assigned separately, not as a group. The script will search for all options (Text components) in this dropdown automatically.

5. A root named language is waiting for you in the XML file. You have to create a node for every new language. The possible amount of languages is unlimited. Please deposit the strings and their translations in the nodes.

6. The language must be changed with a methods call. Only a single script call is needed for this.

7. No the script will search in the XML file for the names of the GameObjects that are marked with a star. It will read the strings of the respective langage.

Top Publisher Assets