angularng2-translatengx-translate

ngx-translate special chars issue


In my angular 4 project I am using ngx-translate. I have a problem with special chars like à, I see only a ?. Do I need to use something particular to translate the special chars? My project is in utf-8

enter image description here


Solution

  • The language file should have UTF-8 encoding, if you do that it should work fine. There is an easy way to do that with notepad, you can do it any how you want.

    1. Open the file in notepad
    2. Click on save as 
    3. Select encoding as UTF-8
    

    enter image description here