When specifying debug locale in write-manifest or as --locale switch I expect the right locale files to load.
When specifying locale files for strings, and following documentation to either set debugLocale or using the --locale switch, SPFx always loads en-us.
Create a new locale string file for some alternate language. Specify gulp serve --locale=xx-yy and en-us is still loaded.
It seems like workbench is picking up the language defined in the node_modules/(at)microsoft/sp-webpart-workbench/lib/api/workbenchInit.js file in the currentUICultureName property. If you'd like to test different languages, you have two options:
ab-CD. This will force the workbench to fallback to the default locale which is then set to the locale specified in the --locale argument or in the debugLocale property.Thank you.. but this would not work for testing extensions due to no local wb support. Oh well.
@wobba - Let's not close this yet, since it's clearly a bug either in documentation or in the latest SPFx packages. We are currently solving where the issue is and we want to address the core scenario.
@wobba when testing extensions, SPFx should pick up the UI language from the site you're using to test it on. Are you seeing otherwise?
It's probably working, it's just that I prefer to have my user using English, and need to test Norwegian. A hassle switching it back and forth. But it works fine when deployed so no worries :)
We have the original debugLocale issue now fixed for the next build. Can't share the exact timeline for the following patch release, but coming soon when we get the needed bug fixes tested and included. Thanks, @wobba for reporting this. Let's close this when the new build is out and we have truly verified the status.
1.3.4 is just released and has a fix for this issue. Can you please try it and let us know if it fixes your issue?
This seems to be working correctly in v1.3.4
Tested with --locale switch and works like a charm :D
Hi, I tested it with version 1.3.4 with both --locale argument and the debugLocale property and it is not working. I use fr-fr. Are we sure that it is solved? Thanks!
UPDATE: When redeploying the sppkg, it worked.
I am trying for SPFx version 1.9.1 and this is my command:
gulp serve --locale=nl-nl
it is still loading en-us.
Any idea, if this is solved? or a problem with dutch?
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues