{"id":41352389,"url":"https://github.com/stas96111/pylocres","last_synced_at":"2026-05-05T06:05:30.687Z","repository":{"id":288688891,"uuid":"950867988","full_name":"stas96111/pylocres","owner":"stas96111","description":"Tool for reading and writing Unreal Engine translation files.","archived":false,"fork":false,"pushed_at":"2025-07-28T20:50:39.000Z","size":221,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-30T23:57:34.584Z","etag":null,"topics":["localization","locres","modding-tools","unreal-engine"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pylocres/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stas96111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T20:01:38.000Z","updated_at":"2025-08-17T18:55:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"970211a7-d2e9-40e1-bb54-dbb28fd2250e","html_url":"https://github.com/stas96111/pylocres","commit_stats":null,"previous_names":["stas96111/pylocres"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stas96111/pylocres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stas96111%2Fpylocres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stas96111%2Fpylocres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stas96111%2Fpylocres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stas96111%2Fpylocres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stas96111","download_url":"https://codeload.github.com/stas96111/pylocres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stas96111%2Fpylocres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28683129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["localization","locres","modding-tools","unreal-engine"],"created_at":"2026-01-23T07:26:26.727Z","updated_at":"2026-01-23T07:26:27.338Z","avatar_url":"https://github.com/stas96111.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧩 PyLocres\n\n[![Unreal Engine](https://img.shields.io/badge/Unreal%20Engine-%23313131.svg?logo=unrealengine\u0026logoColor=white)](#)\n![PyPI](https://img.shields.io/pypi/v/pylocres.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pylocres)\n![License](https://img.shields.io/github/license/stas96111/pylocres)\n![Downloads](https://img.shields.io/pypi/dm/pylocres)\n\n**PyLocres** is a Python library for reading, writing, and editing `.locres` and `.locmeta` files used in Unreal Engine's localization system.  \nSupports **all known versions** of Locres, including the latest.\n\n---\n\n## 📦 Installation\n\nInstall from PyPI:\n\n```bash\npip install pylocres\n```\n\nOr install directly from the repository:\n\n```bash\ngit clone https://github.com/stas96111/pylocres.git\ncd pylocres\npip install -r requirements.txt\npip install .\n```\n\n---\n\n## 🛠️ Command Line Tool\n\n```bash\n# Show info about a .locres file\npylocres info --path example.locres\n\n# Convert .locres to .csv\npylocres to-csv --path example.locres --out output.csv\n\n# Convert .csv to .locres\npylocres from-csv --path output.csv --out result.locres\n\n# Convert .locres to .po\npylocres to-po --path example.locres --out output.po\n\n# Convert .po to .locres\npylocres from-po --path output.po --out result.locres\n```\n\n---\n\n## 📘 Usage: Locres\n\n```python\nfrom pylocres import LocresFile, Namespace, Entry, LocresVersion, entry_hash\n\n# Create Locres file instance\nlocres = LocresFile()\n\n# Read a .locres file\nlocres.read(\"path/to/file.locres\")\n\n# Iterate over all namespaces\nfor namespace in locres:\n    print(\"Namespace:\", namespace.name or \"\u003cdefault\u003e\")\n\n    # Iterate over all entries in the namespace\n    for entry in namespace:\n        print(\"Key:\", entry.key) # cf433749-2e... (uuid4 or custom key)\n        print(\"Translation:\", entry.translation) # Hello world!\n        print(\"Source Hash:\", entry.hash) # 828975897\n\n        # Set a new translation\n        entry.translation = \"Привіт світ!\"\n\n        # Optionally, recalculate source hash\n        entry.hash = entry_hash(\"Hello world!\")\n\n# Create a new entry and add it to a namespace\nnew_entry = Entry(\"my_key\", \"My translation\", entry_hash(\"My source\"))\nnamespace.add(new_entry)\n\n# Add a new namespace\nnew_namespace = Namespace(\"UI\")\nlocres.add(new_namespace)\n\n# Set file format version (default: CityHash)\nlocres.version = LocresVersion.CityHash\n\n# Save the modified locres file\nlocres.write(\"path/to/output.locres\")\n\n# Done\n```\n\n---\n\n## Locmeta Usage\n\n```python\nfrom pylocres import LocmetaFile, LocmetaVersion\n\n# Create Locmeta file instance\nlocmeta = LocmetaFile()\n\n# Read a .locmeta file\nlocmeta.read(\"path/to/file.locmeta\")\n\n# View metadata\nprint(\"Version:\", locmeta.version)\nprint(\"Native culture:\", locmeta.native_culture) # en\nprint(\"Native locres path:\", locmeta.native_locres) # en/Game.locres\nprint(\"Compiled cultures:\", locmeta.compiled_cultures) # [\"en\", \"de\", \"fr\", ...]\n\n# Modify metadata\nlocmeta.native_culture = \"uk\"\n\n# Save changes\nlocmeta.write(\"path/to/output.locmeta\")\n\n# Done\n```\n\n---\n##  License\nMIT License\n© 2025 stas96111\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstas96111%2Fpylocres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstas96111%2Fpylocres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstas96111%2Fpylocres/lists"}