For example:
I18n.t('something')
should output only
something
if the translation missing.
To sum up, the distinction between these terms is the following: Localization (l10N) involves adapting your product or content to particular locales. Internationalization (i18n) is the process of preparing your software-based product for localization.
Internationalization (sometimes shortened to "I18N , meaning "I - eighteen letters -N") is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called localization .
Translation keys are a critical component of the internationalization (i18n) process. They act as IDs that reference pieces of displayable text, allowing strings that require translation to be easily swapped out based on locale instead of being hardcoded into the software.
The Ruby I18n (shorthand for internationalization) gem which is shipped with Ruby on Rails (starting from Rails 2.2) provides an easy-to-use and extensible framework for translating your application to a single custom language other than English or for providing multi-language support in your application.
It is possible: See section 4.1.2 Defaults at Rails Internationalization (I18n) API.
I18n.t :missing, :default => 'Not here'
# => 'Not here'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With