fcf.t() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Performs a line feed. If no translation is found, the original string is returned.
Arguments
- Translation string
- Translation language. If no translation is specified, then the language set in the execution context is used, or the default language if the language in the execution context is not specified.
Result
- Translated string
Example: Function application
fcf.getConfiguration().append ({
translations: [
{
language: "ja",
translations: {
"Hello world": "こんにちは世界",
}
}
],
});
fcf.getContext().language = "ja"
console.log(fcf.t("Hello world"));
Output:
こんにちは世界