Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.09 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.09 KB

Translations From JSON for Godot 4.x

A Godot plugin for importing JSON files for translations.

This is the Godot 4.x version of the plugin. If you want to use it on 3.x, head over to the 3.x branch.

Usage

  1. Install the plugin into your project and activate it.
  2. Add JSON translations files into your project in .json format.
  3. Make sure the JSON files are imported as "JSON Translation".
  4. Add your JSON files to translations using Project Settings > Localization > Translations > Add (Change "All Recognized" to "All files (*)" to see the JSON file)

JSON Format

The json data in file must be an object with locale and messages keys.

  • "locale" field signify which locale the texts are in.
  • "message" field must be an object that contains keys and corresponding text as string value.

Example JSON

{
    "locale": "en",
    "messages": {
        "HELLOWORLD": "Hello world!",
        "ANOTHERTEXT": "This is another text."
    }
}