fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Localization for fluent UI controls.

Open bharath3719 opened this issue 6 years ago • 4 comments

I am trying to implement localization in react web app using i18next and Fluent UI.

The docs day "Fluent UI supports a variety of language codes, which map to the following font stacks: ..." As seen here : https://developer.microsoft.com/en-us/fluentui#/styles/web/localization

Q : How to set the 'language code' in Fluent UI to achieve the same ?

bharath3719 avatar Nov 08 '20 18:11 bharath3719

@bharath3719 Thanks for filing this issue.

We're trying to grow our community over on Stack Overflow to provide answers to coding questions like this. It would be super helpful to file this on Stack Overflow using tags: office-ui-fabric-react, fluentui-react

Thanks again for the feedback.

In the meantime, for setting the direction apply the dir="rtl" attribute to switch the direction.

@behowell / @JustSlone if you have any insight on changing the actual font used please provide a quick workaround.

paulgildea avatar Nov 09 '20 17:11 paulgildea

You should be able to do this by adding lang="something" to the root <html> element. This is supposed to be noted in our documentation, but it looks like there was a copy-paste error causing the content about RTL layouts to be reused in the section that's supposed to be about language-optimized fonts. I made PRs #15883 and #15884 fixing this.

ecraig12345 avatar Nov 10 '20 01:11 ecraig12345

This should be fixed on the website tomorrow morning.

ecraig12345 avatar Nov 10 '20 21:11 ecraig12345

:tada:This issue was addressed in #15884, which has now been successfully released as @uifabric/[email protected].:tada:

Handy links:

msft-github-bot avatar Nov 11 '20 12:11 msft-github-bot