How to use language selector of LoginPage component of Patternfly

90 Views Asked by At

How can I use the language selector (number 2 at image) of Patternfly LoginPage component?

enter image description here

At docs, the language selector dropdown appears in all the examples. However I can't figure out how to use it. I guess there should exist a property on LoginPage to render it but I can't find it.

I have checked the list of properties in the own code too, with no luck.

3

There are 3 best solutions below

0
Rashomon On BEST ANSWER

Seems that LoginPage React component property languageSelector has been removed from Patternfly. Docs are outdated.

Got following response in the github repository issues section:

Yes, I believe this had been removed a while ago as we were working through some design issues. However you can see a core HTML example that includes the language selector here: https://www.patternfly.org/v4/components/login-page/html#with-language-selector

3
tp45 On

enter code hereI think they just help you with design you should do the rest

Use i18n to translate. https://react.i18next.com/latest/using-with-hooks

Try this https://lokalise.com/blog/how-to-internationalize-react-application-using-i18next/

0
Nemanja On

Here you can find full example, with code example and all available props described.