I have a localized Blazor server-side app that supports English (US), German and Swedish. I added the required resource files for de and sv. So I ended up with the following files
App.resx -> invariant (fallback) culture (en-US)
App.de.resx
App.sv.resx
I didn't use de-DE or sv-SE so I have a fallback to the parent if, for example de-AT or sv-FI are configured in the user's browser.
Everything works fine when translating text.
However, I have a couple of components where I format currencies, and I do:
@string.Format(CultureInfo.CurrentCulture, "{0:C}", myValue);
However, when the page is viewed in the parent culture (de or sv) the value is not being formatted and the currency symbol is not being displayed.
Is there a way to get the formatting to work when using the parent culture directly? Or do I really need to specify a complete culture, ie. de-DE and sv-SE?