We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need to override translations on UI with custom translations. Found translation message should be changed by the following logic:
if (overriddenTranslations[key]) { return overriddenTranslations[key]; } else if (translations[locale][key]) { return translations[locale][key]; } else { return translations[fallbackLocale][key] }
But the API will be changed like that:
const overriddenTranslations = { messages: { test: 'custom test message', } } let i18n = new I18nManager({ locale, fallbackLocale, localeFormattingInfo, overriddenTranslations });
p.s. Don't forget updating tests
Original issue: https://github.com/OpusCapita/minsk-core-externals/issues/471 See also: https://github.com/OpusCapita/minsk-core-externals/issues/433
The text was updated successfully, but these errors were encountered:
(#28) Adding override custom translations
979448f
Please, review my changes in current repository and in OpusCapita/react-i18n#4
Sorry, something went wrong.
(#28) Supporting override custom translations
a0d0d68
No branches or pull requests
Description
We need to override translations on UI with custom translations. Found translation message should be changed by the following logic:
But the API will be changed like that:
p.s. Don't forget updating tests
Original issue: https://github.com/OpusCapita/minsk-core-externals/issues/471
See also: https://github.com/OpusCapita/minsk-core-externals/issues/433
The text was updated successfully, but these errors were encountered: