We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Visit my http://example.org The AppServiceProvider and welcome.blade.php have different result.
In AppServiceProvider
echo '<pre>'.print_r(app()->getLocale(), true).'</pre>'; echo '<pre>'.print_r(app()->currentLocale(), true).'</pre>'; echo '<pre>'.print_r(LaravelLocalization::getCurrentLocaleRegional(), true).'</pre>'; echo '<pre>'.print_r(LaravelLocalization::getCurrentLocale(), true).'</pre>'; echo '<pre>'.print_r(LaravelLocalization::getCurrentLocaleName(), true).'</pre>'; echo '<pre>'.print_r(LaravelLocalization::getCurrentLocaleNative(), true).'</pre>';
Result: zh_Hant zh_Hant zh_TW zh_Hant Chinese (Traditional) 繁體中文
In welcome.blade.php:
{{ app()->getLocale() }}<BR> {{ app()->currentLocale() }}<BR> {{ LaravelLocalization::getCurrentLocaleRegional() }}<BR> {{ LaravelLocalization::getCurrentLocaleName() }}<BR> {{ LaravelLocalization::getCurrentLocaleNative() }}<BR> {{ LaravelLocalization::getCurrentLocaleRegional() }}<BR>
Result: en en English English en_GB
This is the same page. I can't find what went wrong.
To Reproduce Steps to reproduce the behavior:
This is en page, why shows zh_TW ?
config\laravellocalization.php
'supportedLocales' => [ 'en' => ['name' => 'English', 'script' => 'Latn', 'native' => 'English', 'regional' => 'en_GB'], 'zh_Hant' => ['name' => 'Chinese (Traditional)', 'script' => 'Hant', 'native' => '繁體中文', 'regional' => 'zh_TW'], 'zh_Hans' => ['name' => 'Chinese (Simplified)', 'script' => 'Hans', 'native' => '简体中文', 'regional' => 'zh_CN'], ... ] 'localesMapping' => [ 'en' => 'en', 'zh_Hant' => 'zh-Hant', //Taiwan 'zh_Hans' => 'zh-Hans', //China ],
The zh_Hant is in the middle of the supportedLocales, why zh_Hant ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Visit my http://example.org
The AppServiceProvider and welcome.blade.php have different result.
In AppServiceProvider
Result:
zh_Hant
zh_Hant
zh_TW
zh_Hant
Chinese (Traditional)
繁體中文
In welcome.blade.php:
Result:
en
en
English
English
en_GB
This is the same page. I can't find what went wrong.
To Reproduce
Steps to reproduce the behavior:
This is en page, why shows zh_TW ?
config\laravellocalization.php
The zh_Hant is in the middle of the supportedLocales, why zh_Hant ?
The text was updated successfully, but these errors were encountered: