Closed kovinet closed 3 years ago
Hi @kovinet, bundle first checks if there is a locale sent in the request and uses that one. If locale is not sent in the request, it uses default locale set in config.
If you would like to have a different flow, you can override loadCurrentLocale
method in Translator
: https://github.com/Locastic/ApiPlatformTranslationBundle/blob/master/src/Translation/Translator.php#L61
I am using this bundle but I have a problem that it is translating entity to locale set in Request, which is not the desired behaviour.
For example I don't have translations for en locale, I only have them for 'sl', but with request with header
accept-language: en,sl
empty translations are returned even though default locale is set to 'sl'.Is there a way to configure the bundle to only use predefined pool of locales (for example: sl, de), so it will ignore request locale but always use fixed one?