{"id":26844958,"url":"https://github.com/moigagoo/loco","last_synced_at":"2025-07-03T17:36:10.875Z","repository":{"id":79247957,"uuid":"162440723","full_name":"moigagoo/loco","owner":"moigagoo","description":"Loco: Localization Package for Nim Apps","archived":false,"fork":false,"pushed_at":"2021-04-26T08:56:35.000Z","size":116,"stargazers_count":21,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-06-27T23:40:36.397Z","etag":null,"topics":["i18n","localization","nim","nim-lang","translation"],"latest_commit_sha":null,"homepage":"https://loco.nim.town","language":"Nim","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/moigagoo.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.rst","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":"2018-12-19T13:23:09.000Z","updated_at":"2024-06-15T12:47:15.000Z","dependencies_parsed_at":"2023-05-29T10:09:25.959Z","dependency_job_id":null,"html_url":"https://github.com/moigagoo/loco","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/moigagoo/loco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moigagoo%2Floco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moigagoo%2Floco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moigagoo%2Floco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moigagoo%2Floco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moigagoo","download_url":"https://codeload.github.com/moigagoo/loco/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moigagoo%2Floco/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263370181,"owners_count":23456426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["i18n","localization","nim","nim-lang","translation"],"created_at":"2025-03-30T19:33:55.127Z","updated_at":"2025-07-03T17:36:10.851Z","avatar_url":"https://github.com/moigagoo.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"**********************************\nLoco: Localization Package for Nim\n**********************************\n\n.. image:: https://travis-ci.com/moigagoo/loco.svg?branch=develop\n    :alt: Build Status\n    :target: https://travis-ci.com/moigagoo/loco\n\n.. image:: https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png\n    :alt: Nimble\n    :target: https://nimble.directory/pkg/loco\n\n\nLoco helps localize Nim apps. Uses classic declaratively defined \"zero-one-few-many\" language variables, but thanks to Nim's superpowers, you also have code completion and compilation checks for language variables.\n\n*   `Repo \u003chttps://github.com/moigagoo/loco\u003e`__\n\n    -   `Issues \u003chttps://github.com/moigagoo/loco/issues\u003e`__\n    -   `Pull requests \u003chttps://github.com/moigagoo/loco/pulls\u003e`__\n\n*   `API index \u003ctheindex.html\u003e`__\n*   `Changelog \u003chttps://github.com/moigagoo/loco/blob/develop/changelog.rst\u003e`__\n\n\nQuickstart\n==========\n\n1.  Install Loco with Nimble:\n\n.. code-block::\n\n    $ nimble install loco\n\n\n2.  Define localizations with ``loco`` macro:\n\n.. code-block:: nim\n\n    # en_US.nim\n\n    import loco\n\n    loco en:\n      hello: \"hello\"\n      users:\n        zero: \"no users\"\n        one: \"{n} user\"\n        many: \"{n} users\"\n\nArgument ``en`` is the name of a *pluralizer*. Pluralizer is a module in ``loco`` that defines pluralization rules for a particural language.\n\n3.  Use them in your code as regular functions:\n\n.. code-block:: nim\n\n    # app.nim\n\n    import en_US\n\n    echo hello() \u0026 \" world\"     # → \"hello world\"\n    echo \"there's \" \u0026 0.users   # → \"there's no users\"\n    echo \"there's \" \u0026 1.users   # → \"there's 1 user\"\n    echo \"there's \" \u0026 12.users  # → \"there's 12 users\"\n\n\nContributing\n============\n\nAny contributions are welcome, be it pull requests, code reviews, documentation improvements, bug reports, or feature requests.\n\nIf you decide to contribute through code, please run the tests after you change the code:\n\n.. code-block::\n\n    $ docker-compose run tests                  # run all tests in Docker\n    $ docker-compose run test tests/testen.nim  # run a single test suite in Docker\n    $ nimble test                               # run all tests natively\n    $ nim c -r tests/testen.nim                 # run a single test suite natively\n\n\n❤ Contributors ❤\n==================\n\n- `@moigagoo \u003chttps://github.com/moigagoo\u003e`__\n- `@Nindaleth \u003chttps://github.com/Nindaleth\u003e`__\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoigagoo%2Floco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoigagoo%2Floco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoigagoo%2Floco/lists"}