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

Wrong locale since SF update 4.3.1 #348

Open
rjwebdev opened this issue Jun 21, 2019 · 3 comments
Open

Wrong locale since SF update 4.3.1 #348

rjwebdev opened this issue Jun 21, 2019 · 3 comments

Comments

@rjwebdev
Copy link
Contributor

rjwebdev commented Jun 21, 2019

After updating my symfony project from 4.2.9 to 4.3.1, my app keeps using the locale I put under the parameters.locale key:

parameters:
    locale: 'nl'

Translation component config:

framework:
    default_locale: '%locale%'
    translator:
        default_path: '%kernel.project_dir%/translations'
        fallbacks:
            - '%locale%'

Configuration of the bundle:

lexik_translation:
    fallback_locale: [nl]         # (required) default locale(s) to use
    managed_locales: [nl, fr] # (required) locales that the bundle has to manage
    auto_cache_clean: true
    grid_input_type: textarea
    base_layout: 'bundles/LexikTranslationBundle/layout.html.twig'
    resources_registration:
        type:                 database
        managed_locales_only: true

Before I updated my project, the locale was set correct according to the profiler but after my update to Symfony version 4.3.1, translation locale keeps using the one set under the parameters and thus defined as default_locale

Maybe it has to do something with symfony/symfony#28929

There's already a pull request for this:
#347

But the bundle doesn't load the correct translationsl

@skytorner
Copy link

Hey @rjwebdev Do you still have this bug ? Because I updated my project too - same version as you now - and the translations won't work.

Did you manage to get something working ?

Thanks

@rjwebdev
Copy link
Contributor Author

I temporary use the fix made in the pull request from my previous comment untill the PR is merged and a new version of this package is released.

@skytorner
Copy link

Right, thanks for the indication, I didn't pay attention to the provided link !

I hope they will merge it and release it soon !

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