@scandipwa/webpack-i18n-runtime
is responsible for this mechanics in the Create ScandiPWA App ecosystem.i18n
folder of your application. It will also warn you, if some translations are duplicated, invalid or missing.@scandipwa/scandipwa
. Let's assume we are using @scandipwa/scandipwa
of version 4.0.1
. @scandipwa/scandipwa
of version equal or higher than the 4.0.1
therefore, the @scandipwa/webpack-i18n-runtime
extension is already installed and enabled.@scandipwa/scandipwa
is written in translatable fashion. Indeed, most files contain proper translations, in example: AddToCart
.ru_RU
locale in the package.json
's field scandipwa.locales
as follows:i18n/ru_RU.json
of our theme.@scandipwa/scandipwa
theme since version 4.0.1
and above. In case of custom project, you must install and enable it manually.scandipwa
extension__(...)
translation function. Every string wrapped into this function will be available to translate inside of your translation files.package.json
file of your theme, as follows:./i18n/${locale}.json
during the build time.en_US
. No translation files will be automatically generated for this locale. You may create a translation file for the default locale manually, usually, it is not necessary.null
, undefined
, ""
) values can be overwritten even from a file with lower priority.i18n/${locale}.json
file.JSON.parse
able, you are going to be warned about it as well."Account": null
(any falsy value, not only null) and some parent theme or extension's one contains "Account": "Compte"
, the second one will be taken (even though the priority is lower for that one) and you will get alarmed about it.defaultLocale
to your index.html
file.