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
Hi,
I noticed TranslationMiddleware detects browser locale with following code at line 86.
$browserLocale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);
is it possible to use config/translator variables to also support full HTTP_ACCEPT_LANGUAGE info?
Maybe something like this:
if( config('translator.browserLocale', true) ){ $browserLocale = $request->server('HTTP_ACCEPT_LANGUAGE'); }else{ $browserLocale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2); }
By setting config data default to true we are supporting backward compatibility, correct?
This way we could choose from getting 'en' or 'en_US'
I havent checked if languageRepository->isValidLocale() requires a two character data.
Anyway, hope this helps improve even better your package.
warm regards
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I noticed TranslationMiddleware detects browser locale with following code at line 86.
$browserLocale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);
is it possible to use config/translator variables to also support full HTTP_ACCEPT_LANGUAGE info?
Maybe something like this:
By setting config data default to true we are supporting backward compatibility, correct?
This way we could choose from getting 'en' or 'en_US'
I havent checked if languageRepository->isValidLocale() requires a two character data.
Anyway, hope this helps improve even better your package.
warm regards
The text was updated successfully, but these errors were encountered: