turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 155 forks source link

Arabic and French translation doesn't get replaces in javascript files #409

Open alexvazquez opened 3 years ago

alexvazquez commented 3 years ago

I have an app that accepts the following languages:

All languages except Arabic (ar-SA) and French (fr) updates the javascript file. In the javascript I have some custom field validations and this is just one of 50 forms but I just wanted to start with this one and make sure all works.

You can see in the image that the validations that are in the javascript doesn't get updated. But this doesn't happen if I change to English or Spanish.

I'm using Bundle and in the view I have this code:


  @{
        var lang = Session["currentLanguage"];

    }
    @Scripts.Render(Scripts.Url("~/bundles/loginjs") + "&lang=" + Request.Cookies["i18n.langtag"]?.Value))

But I think this code doesn't work well, I just tried it in Incognito Mode and I'm not getting it right. So maybe is not the language is that the javacript is not being updated.

image

Any way or workaround to solve it?

Thanks