Skip to content
New issue

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

Problem with default language #149

Closed
DesRodman opened this issue Jun 20, 2019 · 3 comments
Closed

Problem with default language #149

DesRodman opened this issue Jun 20, 2019 · 3 comments

Comments

@DesRodman
Copy link

DesRodman commented Jun 20, 2019

Good day
I found a problem in browser Google Chrome
Default language is ENGLISH, at first time browser is opening site on russian language.
I can just between other languages, but if i want to open in english - site goes to russian (default language of browser)

At same time under Firefox - language switching works fine

What i did wrong?

Thanks

@mikehaertl
Copy link
Collaborator

Sorry, with the information you give, I can't help you. The extension is well tested and widely in use, so I can say with some certainty that whatever your problem is, it's probably some misconfiguration - or expected behavior.

Maybe check the README again very thoroughly. Your problem also sounds somewhat like this:
https://github.com/codemix/yii2-localeurls#reset-to-default-language

I'm closing this for now unless you can provide a configuration example and a clear description what to do to reproduce the issue.

@DesRodman
Copy link
Author

DesRodman commented Jun 21, 2019

here my common config

 'sourceLanguage' => 'en',
    'language' => 'en',
....
 'urlManager' => [
            'class' => 'codemix\localeurls\UrlManager',
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'languages' => ['en', 'ru', 'zh', 'hi', 'de'],
            'enableDefaultLanguageUrlCode' => false,
            'enableLanguagePersistence' => false,
            'rules' => [
                //
            ],
        ],

menu i'm creating via

$buttons .= '<li>'.Html::a( $lang->name, Url::to(['/' . $lang->url, 'language' => $lang->url])).'</li>';

all like in README
but why problem - cant understand

@mikehaertl
Copy link
Collaborator

I can not really help. Check the code, it's not that complex. Try to debug and find out what's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants