Change default Locale in angular

Discussão em 'Angular' iniciado por Rabie Daddi, Fevereiro 24, 2025.

  1. Rabie Daddi

    Rabie Daddi Guest

    I built an angular app in french, so now i want to use internationalization (i18n) to provide it in other languages like En, so the problem is the default locale for Angular is en-US and when i write this <span i18n>Mes endroits</span>,I have this

    <file source-language= "en-US" datatype="plaintext" original="ng2.template">// source is English
    <body>
    <trans-unit id="4df6e2173dc9d9f8c60481273cf3371981e60fde" datatype="html">
    <source>Mes endroits</source> ... // but this is in french


    and i want the source language to be fr and provide for example messages.en.xlf


    so can I change the default locale to fr , or I have to rewrite my code in English and provide messages.fr.xlf
    ​

    Continue reading...

Compartilhe esta Página