Adding Localizations (i18n)ΒΆ
OpenCrowbar uses the Rails I18N library. Please refer to the documentation http://guides.rubyonrails.org/i18n.html for usage hints that can help you reduce coding, and to add features such as Interpolation.
Each barclamp is expected to add its own localization (i18n) file.
Note: Please do not add your localizations into anotherbarclamp’s i18n file. | You must also be careful not to create duplicate entries; doing so can confuse OpenCrowbar.
Add your localization file (
en.ymlis the default) into thecrowbar_framework/config/locales/[barclamp]directory.Note: You must replace [barclamp] with the name of your barclamp.
If you are supporting multiple languages, replace
enwith the target language code. For example, usefr.ymlif you want to provide French translations.Inside the i18n file, provide a simple YML hash for translations. For example:
en: # Layout nav: nodes: Nodes nodes_description: Infrastructure Components**Reminder**: Encode your translations in quotes if you need to use comma ( : ) or tick ( \` ) characters!