Awesome
Simple .lng File Parser
This is a simple .lng file parser that can parse .lng files and output them in json format for translate the content.
More info
The .lng format is used in games from the German company HandyGames to store localized text and interface strings. This code was taken from a decompiled Java application.
Usage
Installing Dependencies
pip install deepl-cli
Arguments
input_file
: Path to the .lng/json file that you want to parse.--output_file OUTPUT_FILE
: Name of the output file (default: out.lng/out.json).--convert_to_json
: Flag to convert the file to json/po format.--translate
: Flag to translate the json content.
Examples
- Parse a .lng file to json format:
python -m pylng example.lng --convert_to_json
- Translate the content of a json file:
python -m pylng example.json --translate
- Convert .json to .lng:
python -m pylng example.json