I'm currently working on translating a multistep form using Angular Translate and routing with ui-router.
Everything seems to be functioning properly except for one issue.
Below is the snippet of my code:
Translation Setup:
.config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: 'App/i18n/locale-',
suffix: '.json'
});
$translateProvider.preferredLanguage('ir');
})
Example of en.json and ir.json files:
{
"wizardForm":{
"stepOne":{
"LABEL": "ثبت متقاضی",
"NATIONALCODE": "کد ملی",
"NAME": "نام",
"FATHERNAME": "نام پدر",
"GENDER": "جنسیت",
}
}
en.json example:
{
"wizardForm":{
"stepOne":{
"LABEL": "Register Requester",
"NATIONALCODE": "National Code",
"NAME": "NAme",
"FATHERNAME": "Father Name",
"GENDER": "Gender",
}
}
HTML Code Snippet:
<label translate="wizardForm.stepOne.NATIONALCODE">
</label>
The translation works perfectly in other sections, but not in the form. Am I overlooking something here?