Skip to content
OpenHogwarts edited this page Dec 24, 2017 · 5 revisions

Add new language

Do you want to translate the game to another language?

Just send a PR (pull request) with the following changes!

  1. Edit LanguageManager.cs#L22 (availableLanguages var) and add your language (options list: https://docs.unity3d.com/ScriptReference/SystemLanguage.html)
  2. Add the translation here: https://github.com/OpenHogwarts/hogwarts/tree/master/Assets/Resources/i18n

Don't worry about the .meta file, it is autogenerated by Unity.

Modify existing language

  1. Edit it's .json file: https://github.com/OpenHogwarts/hogwarts/tree/master/Assets/Resources/i18n

Usage

  1. To translate a UnityEngine.UI.Text component, simple add LocalizedText component too and set the label translation on Text component.
  2. For incode translation => LanguageManager.get("PHRASE_HERE")

Clone this wiki locally