FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

Configuration parameter translations

Configuration parameter: translations

Package: fcf-framework-core

Available from version: 2.0.2

Type: [object|string]

Default value: []

An array with information about translations. Can be specified either as an object containing translations, or as a string containing the path to the translation file.

If an array element is an object, then it must have the following fields:

  • string language - Translation language

  • object translations - Object with translations. The key is the source string, and the value is the translation into the language specified in the "language" property.


fcf.getConfiguration().append( { "translations": { "language": "ja", "translations": { "hello": "こんにちは" } } } );

If the array element is a string, then the string must contain the path to a JSON file with a structure similar to the object containing the translation.