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

Default fallback language? #35

Open
boonstoppel opened this issue Mar 30, 2022 · 3 comments
Open

Default fallback language? #35

boonstoppel opened this issue Mar 30, 2022 · 3 comments

Comments

@boonstoppel
Copy link

Is it possible to set a default fallback language?

My browser language is set to english, but my website only allows languages "de", "fr" and "it". Currently this will set "undefined" as language.

In the config have set 'auto' => true

@boonstoppel
Copy link
Author

Also, for the scenario above, this code:

@foreach (language()->allowed() as $code => $name)
        <a href="{{ language()->back($code) }}">{{ $name }}</a>
@endforeach 

will return:

<a href="http://velodach.test/languages/de/back">Deutsch</a>
<a href="http://velodach.test/languages/fr/back">Français</a>
<a href="http://velodach.test/languages/it/back">Italiano</a>
<a href="http://velodach.test/languages/en/back">Unknown</a>

Notice the last line:

<a href="http://velodach.test/languages/en/back">Unknown</a>

@boonstoppel
Copy link
Author

ping...

@7dir
Copy link

7dir commented Jun 24, 2022

ping...

pong )))

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