Closed zhil closed 13 years ago
@zhil the default locale in Symfony is en
unless specified differently in your config. So if you don't set the locale explicitly (either through the _locale
routing param or through $session->setLocale()
), the locale will be en
.
thanks a lot for the quick response :)
well, I have set in my app/config/config.yml translator: { fallback: ru }
should I add something more to it? :)
This is about the translation fallback, not about the session default locale.
framework:
session:
default_locale: ru
thanks a lot, works :)
If anybody here wants to force locale, you can just do:
admin_area:
resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
prefix: /admin
defaults:
_locale: en
in project/config/routes/sonata_admin.yaml
For some reasons I cant force SonataAdminBundle to use my local
My locale loaded correctly - because messages which are missed in SonataAdminBundle locale (breadcrumbs, my custom messages) are translated correctly.
But for all messages, which exists in Sonata locale files - 'en' translation used and I cant override it in my locale. I supposed, maybe they have something like [code]$this->get('session')->setLocale('en_US');[/code] and some kind of language selection in some settings page, but no function setLocale calls was founded in bundle.
Right now I dont have any ideas what can I do next, any suggestions are welcome :)
Topic is reposted here http://forum.symfony-project.org/viewtopic.php?f=23&t=37100