Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1016 Bytes

README.md

File metadata and controls

42 lines (27 loc) · 1016 Bytes

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

  1. Parse a .lng file to json format:
python -m pylng example.lng --convert_to_json
  1. Translate the content of a json file:
python -m pylng example.json --translate
  1. Convert .json to .lng:
python -m pylng example.json