Skip to main content

A small package for translating Python applications

Project description

Linguarita

When gettext doesn't work and you are sick of writing your own language engine for every program, you came to the right place! Linguarita is a generic language engine retrieving translations from JSON files.

The changelog can be found at https://codeberg.org/lucien-rowan/linguarita/src/branch/main/CHANGELOG.md

Installing the module

You can either copy the source code and directly include linguarita.py into your program but I find that difficult. Instead, you can just open your virtual environment and type pip install linguarita-lucien-rowan into the terminal.

Using the module

Basically, your project needs the following files:

  • main.py (can be another name as well, just for execution)
  • translations/(lang).json (the translations are stored in JSON files, just replace (lang) with the actual language like en for English, de for German or ua for Ukrainian)

The translations occur with linguarita.translateText(og_str, langcode) with og_str being the string you want to translate (must be the same as in the JSON file) and the langcode being the filename of the JSON file before the dot.

Contributing

Of course, this module also needs some attention.

Which attention?

  • Enhancing it with useful features
  • Fixing the bugs that might occur
  • Documenting its API
  • Translating that documentation to other languages
  • Implementing it into Python applications

While Linguarita is a simple module from its code, it might seem a bit hard to implement it in real life scenarios. Therefore, documentation and example applications will follow.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linguarita_lucien-rowan-0.0.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linguarita_lucien_rowan-0.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file linguarita_lucien-rowan-0.0.2.tar.gz.

File metadata

  • Download URL: linguarita_lucien-rowan-0.0.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for linguarita_lucien-rowan-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b1931f517fc20b2676494d1e73fd0ba5e6ff5aa265bcb11126ad4c550d0efe55
MD5 f83784ba003dcaf0099912391fc131c3
BLAKE2b-256 a70f25866c3cd8613f620a7597b4b54f21cea672f91ed1db5444c4cc6abbbd49

See more details on using hashes here.

File details

Details for the file linguarita_lucien_rowan-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for linguarita_lucien_rowan-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a43c3405a464a05d86e1ba2bad8543ccee63335bd0cfb78547ed6851281a355
MD5 4b2efb213e607fc6ec3b1a56dc357bfa
BLAKE2b-256 e9957ca4189962381cd43af7e22081e59de6a0253e02ebc181f8b49477b589fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page