cbi18n
key in the moduleSettings
structure within the config/Coldbox.cfc
defaultResourceBundle
default
. The path must NOT include language or variants, just the name of path prefixincludes/i18n/main_en_US.properties
should be specified as includes/i18n/main
resourceBundles
{}
defaultLocale
en_US
unknownTranslation
logUnknownTranslation
defaultResourceBundle
, because it will conflict with your main settings.
If you specify additional resourceBundles
it is wise to choose an aliasname
which will not conflict with other modules or your main settings.properties
file containing your translations (java resources) OR a .json
file. For instance, using the default settings above, you would need to create a includes/i18n/main_en_US.properties
file with your translations. If you want to use JSON files, you should use an includes/i18n/main_en_US.json
file..properties
- Java resource bundle.json
- JSON resource bundle (flat or nested)i18n
this is now called cbi18n
to comply with the same global naming convention. Just update your key root in your Moduleconfig.cfc.
resourceBundles
struct represent the bundle
that can be passed to getResource
or appended on the resource
string with an @
sign.