LanguageSystem Pro
  • Welcome
  • Getting Started
    • Quickstart
    • Importing and Exporting
    • InternalDatabase Mode
    • ExternalFiles Mode
    • GlobalExternal Mode
    • ComponentBased Mode
    • Importing Translated Text into Custom Script
    • LanguageAudioManager
    • AudioWarper Component
    • Importing Audio into Custom Script
    • Switching Languages
    • LanguageManagerEditor
Powered by GitBook
On this page
  1. Getting Started

GlobalExternal Mode

GlobalExternal Mode

In GlobalExternal Mode, a single global language file is used to store translations for all languages in one place. This file must be placed in the StreamingAssets/Languages folder and should contain all translations for all supported languages. This is a good option if you prefer to manage all translations in a single file rather than having separate files for each language.

Preparing the Global Language File:

  1. Inside the StreamingAssets/Languages folder, create a global language file (e.g., globalLanguages.json, globalLanguages.xml, or globalLanguages.csv).

  2. The global file should follow this format:

{
  "TextEntries": [
    {
      "TextID": "greeting",
      "Translations": [
        {
          "LanguageID": "en",
          "TranslatedText": "Hello World"
        },
        {
          "LanguageID": "pt-br",
          "TranslatedText": "Olá Mundo"
        }
      ]
    },
    {
      "TextID": "farewell",
      "Translations": [
        {
          "LanguageID": "en",
          "TranslatedText": "Goodbye"
        },
        {
          "LanguageID": "pt-br",
          "TranslatedText": "Adeus"
        }
      ]
    }
  ]
}
  • TextID: The unique identifier for each text entry.

  • Translations: This list holds translations for each TextID, where each entry has a LanguageID (e.g., en, pt-br) and the corresponding TranslatedText.

Note: The system will load this file during game initialization and use it to switch between languages.

Using WarpText with GlobalExternal Mode:

As with other modes, the WarpText component is used to display text in your game based on the TextID.

  1. Add the WarpText component to any Text or TextMeshProUGUI object in your scene.

  2. Set the TextID field in the WarpText component to match the ID from the global language file (e.g., greeting, farewell).

When the game starts, the LanguageSystem Pro will load the global file from StreamingAssets/Languages and automatically update the text in real time based on the selected language.


File Formats Supported:

The global language file can be in any of the following formats:

  • JSON: globalLanguages.json

  • XML: globalLanguages.xml

  • CSV: globalLanguages.csv

You can choose whichever format suits your workflow. The system will automatically detect and load the correct file during runtime.


Switching Languages:

To change the language in GlobalExternal Mode, the system will reload the TranslatedText values from the global file based on the selected language. You can implement a dropdown or a similar method to allow users to switch languages dynamically.

Make sure to follow this process for all texts that you want to be translated within your game.

Reminder: LanguageManagerEditor Tool

We offer a free LanguageManagerEditor tool, specifically designed for the LanguageSystem Pro format. It has a friendly interface and supports easy import, editing, and export of files in CSV, JSON, and XML formats. You can use this tool to export global files for the InternalDatabase and GlobalExternal modes or individual files per language for ExternalFiles mode.

For more details on using this editor, see the LanguageManagerEditor section.

PreviousExternalFiles ModeNextComponentBased Mode

Last updated 8 months ago