Skip to main content

A localization library for python utilizing Google's ARB format for Flutter

Project description

pyARB

PyPI PyPI - License

A localization library for python utilizing the ARB format for Flutter.

Usage

pyARB takes a primary .arb file and generates a python code equivalent.

pyarb l10ns [-h] [-e USE_EXISTING] arb_location [target_directory]

positional arguments:
  arb_location          The directory containing the arb files.
  target_directory      Location of the generated py file. Defaults to the directory above arb_location.

optional arguments:
  -h, --help            show this help message and exit
  -e USE_EXISTING, --use-existing USE_EXISTING
                        Use existing arb files as locale list. You must specify the primary arb here

pyarb l10ns path/to/directory will prompt the user for a list of locales. The first in the list will be considered the primary locale and will be set as the fallback locale in case there is a problem localizing for another locale. The primary .arb file must be present, but if other locales specified are missing it will create the missing .arb file with the contents of the primary file. If a locale is already present then it will be left as it to preserve translations already present in the file.

pyarb l10ns path/to/directory -e en_US will use the existing arb files as the list of allowed locales. It will use the specified locale as the primary locale, in this case: 'en_US'.

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

pyarb-1.0.4.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

pyarb-1.0.4-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

Supported by

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