-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
Description
Lets say you have a language selector, now you are on the english site, so all the languages are in english fx
- Danish
- French
- Russian
Now you select Russian, now the dropdown will look something like this
- английский
- датский
- французский
Instead it would be lovely to have a dropdown that always look something like this
- Dansk
- Français
- Pусский
Example
$locales = Intl::getLocaleBundle()->getLocaleNamesNotTranslated();
dump($locales);
....
"ru" => "русский",
"da" => "dansk",
"fr" => "français",
....
It would be exactly like doing this
\Locale::setDefault('fr');
$locales = Intl::getLocaleBundle()->getLocaleNames();
$french = $locales['fr'];
\Locale::setDefault('ru');
$locales = Intl::getLocaleBundle()->getLocaleNames();
$russian = $locales['ru'];
\Locale::setDefault('da');
$locales = Intl::getLocaleBundle()->getLocaleNames();
$danish = $locales['da'];