(@fluent/react) Add changeLocales and currentLocales on provider by macabeus · Pull Request #501 · projectfluent/fluent.js

Closes this issue: #500

This PR aims to add on useLocalization a function to change the current locale, changeLocales. So on a nested component will can to updates the locale. It's useful for a "choice language" selector.

In addition to returning changeLocales on useLocalization, I also added to return currentLocales, in order to avoid two sources of truth. So a "choice language" selector will need just to read the current language from the provider.

I also updated the example adding the component "choice language".