Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DragoniteSpam/GMLocalize2
now with a visual interface, plus gms2
https://github.com/DragoniteSpam/GMLocalize2
Last synced: 2 months ago
JSON representation
now with a visual interface, plus gms2
- Host: GitHub
- URL: https://github.com/DragoniteSpam/GMLocalize2
- Owner: DragoniteSpam
- Created: 2020-11-10T22:53:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-05T04:23:35.000Z (over 2 years ago)
- Last Synced: 2024-08-02T07:10:34.200Z (5 months ago)
- Language: C#
- Size: 77.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-gamemaker - GMLocalize - Not a full localization solution. Extracts text strings for localization from a GameMaker Studio 2 project and saves it to a JSON file. (Localization / Recommendations)
README
# GMLocalize (version number two)
Extract text strings for localization from a GameMaker Studio 2 project, and save it to a JSON file.
I might make this a proper text localization tool later. Who knows.
In case you're wondering, Version 1 was [this thing](https://github.com/DragoniteSpam/GMLocalize). It worked, kinda.
### Usage
This tool will pull out any bare string passed as the first parameter to a **localization** function.
var localized_text = __("The quick brown fox jumped over Donald Trump");
The localization function can be named anything. The default is two underscores (`__`).
Anything that is not a bare string **will not work,** and will probably cause the output to break:
var localized_text = __("The quick brown fox " + "jumped over Donald Trump");
/* name = "Donald Trump" */
var localized_text = __("The quick brown fox jumped over " + name);
/* text = "The quick brown fox jumped over Donald Trump" */
var localized_text = __(text);In any event, if you actually want to translate a game to different languages, you're going to need some kind of string formatter anyway, because most languages don't follow the same rules as whatever language you are developing in.
/* name = "Donald Trump" */
var localized_text = __("The quick brown fox jumped over %0");
var formatted_text = format(localized_text, name);From there, you can save it to a json file.
### Building
It's a Visual Studio project, or something
### Credits
- Program icon - Language by The Icon Z from the Noun Project