Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

i18n Support #17

Description

@Chew

Rails has native i18n support (see config/locales).

In the code, you need to do the following:

t('key')

Or, in controllers:

I18n.t('key')

Assuming you have the corresponding value in config/locales/en.yml:

key: Global Value

You can specify the locale however we want. Maybe a dropdown for it in the navbar?

If there are no translations in the given language, it falls back to the default (English).

I've not much experience with Crowdin, but it should be pretty simple to figure out. I won't be the one able to make it, though.

On RubyMine, not sure about other clients, but selecting a t('string') and pressing CMD+0 hides it with the actual translation. Quite poggers

For strings specific to a file/controller, you simply need to do this:

In locale:

controller:
  action:
    key: Local Value

So in app/controllers/controller.rb method action or app/views/controller/action.html.erb you can do:

t('.key')

Which will put "Local Value" instead of "Global Value". It definitely saves on key length.

There are not many Strings right now, but we don't want to get too far behind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendThis issue or pull request relates to an issue/change on the backendlogisticsSomething that requires something out of our control (Geyser admins for example)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions