The lang files are stored in the src/custom/lang
directory. Each language will have its own file and structure looks like below:
Lang file layout
{
"app": {
"name": "SmartAdmin"
},
"nav": {
"application_intel": "Analytics Intel",
"application_intel_analytics_dashboard": "Analytics Dashboard",
"application_intel_marketing_dashboard": "Marketing Dashboard",
}
}
HTML indicators to trigger change
<nav>
<span data-i18n="nav.application_intel"></span>
<span data-i18n="nav.application_intel_analytics_dashboard"></span>
<span data-i18n="nav.application_intel_marketing_dashboard"></span>
</nav>
Script
$.i18n.init({
resGetPath: 'media/data/__lng__.json',
load: 'unspecific',
fallbackLng: false,
lng: applang
}, function (t){
$('[data-i18n]').i18n();
});
Dependencies (if you wish to load it manually)
<script src="js/app.jquery.bundle.js"></script>
<script src="js/i18n/i18n.js"></script>