Rails has native i18n support (see config/locales).
In the code, you need to do the following:
Or, in controllers:
Assuming you have the corresponding value in config/locales/en.yml:
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:
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.
Rails has native i18n support (see config/locales).
In the code, you need to do the following:
Or, in controllers:
Assuming you have the corresponding value in config/locales/en.yml:
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:
So in
app/controllers/controller.rbmethodactionorapp/views/controller/action.html.erbyou can do: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.