Skip to content

Simple .lng File Parser from HandyGames games

Notifications You must be signed in to change notification settings

CakesTwix/pylng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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