0

I have built a ListViewCommandSet SPFX Extension to add a button to all document libraries on our tenant.

I wish to translate both the button text and the popup dialog text for our Canadian French-speaking users.

I have used the standard SPFX approach by adding a fr-ca.js file to the loc folder and added translations there.

The dialog translations display correctly when I use gulp serve --locale=fr-ca. However when I deploy this to our test tenant and change my user profile language to French Canadian, all the SharePoint menus etc are displaying in French, but the SPFX Extension dialog text and button text are showing in English.

Do I need to do anything other than changing my O365 user profile to French to see the translations? What logic does SPFX use to display translations? The site has been set to allow French as an optional language.

David G
  • 56
  • 5
  • 1
    Is everything on fr-ca? What does "navigator.language" in browsers console say? Maybe you have something on fr-fr? – devil_inside Oct 03 '22 at 13:48
  • @devil_inside thanks it does look like it is loading the site in fr-fr rather than fr-ca, which is the user account language. I'm curious to know why the settings menu, default list buttons etc load in French by changing my user account settings, but SPFX can't use the same logic to change language. – David G Oct 03 '22 at 14:57
  • 1
    Well I cant really help you with that :( But maybe its the best if you either have both "fr-ca" and "fr-fr" files or completly try to switch to "fr-fr"? – devil_inside Oct 03 '22 at 16:01

0 Answers0