This extension uses i18next to display localized text for translation keys in code.
Several translation backends are supported and can be used in conjunction by updating the order in Backend > List setting.
A backend must be selected, otherwise no translations will be loaded.
Additionally, the I18n Options settings are required unless the default suffices. I18n Options > Namespaces are the possible namespaces, and I18n Options > Supported Lngs are all the possible languages. Without these, the extension will not function properly.
To enable Contentful backend, add contentful to the Backend > List setting. Then fill in all the required settings in Backend > Contentful Options.
To enable File System backend, add fileSystem to the Backend > List setting. Add the load path according to the Backend > File System Options.
-
Inline translations
-
Translation on hover showing all translated values
translations.hoverenabled: enable/disable display on hover over a localization key
translations.inlineenabled: enable/disable inline value of key in default languageposition: position to show the value of the key, either end of line or adjacent to key
translations.backendlist: list of backends to use and the order in which to use them. Currently supportsFile SystemandContentful. If more than one item exists in the list, the first will be primary and the rest used as a backup in the case of a missing key in the primary.fileSystemOptions: options to pass to the file system backend, the following is required:- loadPath: the path from where to load translations. It contain
{{lng}}and{{ns}}.
- loadPath: the path from where to load translations. It contain
contentfulOptions: options to pass to the contentful backend, the following are required:- host: either
https://cdn.contentful.comorhttps://preview.contentful.com - environment: "master" or another environment
- space: the contentful space id to use
- accessToken: the access token generated in Contentful settings.
- host: either
translations.i18nOptions


