Jump to content

Localization Editor

   (0 reviews)

3 Screenshots

About This File

Localization Editor is a tool for creating and editing localization/language files which your game or application can use to support several languages.

Git Hub repository: https://github.com/Dreikblack/Localization-Editor

  • Localization Editor loads all .local files in folder when you open or create one.
  • You can use names like map1.English.local and then only map1 files will be loaded for editing.
  • .local format is pretty simple:

 

Quote

key1=content1

key2=content1\ncontent2

 

  • \n used for multi lines texts, but in this tool you can just tap Enter to make a new line.
  • Double click on table string line to open edit string line dialog.
  • Find specific line quickly by typing a characters that key contains in the filter field, cross button to show all lines
  • You can switch between loaded language localizations with combo box next to "Current Localization" label.
  • Once you done remember to save changes to localization files with "Save All" button

Parsing a local file in a code:

    auto stream = ReadFile(path);
    if (!stream) {
        return newLocalMap;
    }
    WString text = stream->ReadWString();
	//map key-content
    std::map<WString, WString> newLocalMap;
    vector<WString> textStrings = text.Split("\r\n");
    for (WString line : textStrings) {
        vector<WString> entitiyProperties = line.Split("=");
        if (entitiyProperties.size() > 1) {
            WString newLine = entitiyProperties[1].Replace("\\n", "\n");
            newLocalMap[entitiyProperties[0]] = newLine;
        } else {
            newLocalMap[entitiyProperties[0]] = "";
        }
    }
    stream->Close();

 


What's New in Version 12/21/2024 05:05 PM   See changelog

Released

No changelog available for this version.

 Share


User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
×
×
  • Create New...