PolyglotUnity
A Unity3d plugin for Polyglot Localization, which is a project that translates games to many languages. This plugin makes it possible to automatically download the polyglot master spreadsheet and a custom game specific spreadsheet and parses it in a unity project.
https://docs.google.com/spreadsheets/d/17f0dQawb-s_Fd7DHgmVvJoEGDMH_yoSd8EYigrb0zmM/
Unity Version
Works with Unity 4.x, 5.x and 2017.x
Tested with several Unity Versions
- Unity 5.4.4f1
- Unity 5.5.2f1
- Unity 5.6.0f3
- Unity 5.6.1f1
- Unity 2017.1.0b1
- Unity 2017.2.0f3
- Unity 2017.2.0p2
- Unity 2017.3.0b10
Feedback
We would 😍 to hear your opinion about this library. Please file an issue if there's something you would like to see improved.
If you use this library and are happy with it consider sending out a tweet mentioning @agens. This library is made with love by Skjalg S. Mæhre.
First, you need to Configurate the Localization.
You do this by selecting the Configurate menu item from within Unity. This will create the Localization asset for you if it is not set up yet and then select it.
Then you can specify the localization settings for the project.
Finally you can add Localized Text components to your Text objects
Theres also a Language Dropdown script that automatically populates a Dropdown with the available languages
Current Features
- Download latest polyglot master sheet as CSV or TSV
- Download a custom localization sheet as CSV or TSV
- If you use the same keys as the master sheet your keys will override the master sheet.
- Import the downloaded file and parse it
- The sheet is parsed every time you play the game so you can iterate fast.
- Managing localizations
- Specify any number of csv or tsv files to parse
- Select language
- Select fallback language if the localization key does not exist in the currently selected language
- Invokes event when language is changed
- Script for localizing UGUI Text component, TextMesh component and TextMesh Pro UGUI component
- Auto completes localization key
- Updates text and alignment of text (hebrew and arabic is left to right).
- Supports parameters for localized strings such as "No {0} Selected".
- Script for saving selected language
- Saves to PlayerPrefs
- TextMesh Pro support
- Make sure TMP_PRESENT is specified in Player Settings -> Scripting Define Symbols
- Arabic font type support
- Download ArabicSupport.cs from https://github.com/Konash/arabic-support-unity
- specify ARABSUPPORT_ENABLED in Player Settings -> Scripting Define Symbols