Closed benwalch closed 1 year ago
As discussed, you shouldn't use getActiveLanguages
in country mode. Use getActiveCountries
instead.
Twig code example: https://github.com/dachcom-digital/pimcore-i18n/blob/master/docs/60_CodeExamples.md#country-selection
Consider a website having the following different locales:
de_DE
andde_CH
.When the current locale is
de_DE
and the active languages are requested from i18n context using https://github.com/dachcom-digital/pimcore-i18n/blob/master/src/I18nBundle/Context/I18nContext.php#L134, both entries are marked active. If this is intended behaviour, this should be reconsidered since it is a valid case having two different sites, with different locales but the same "language". Furthermore it would be an improvement to also provide the the corresponding locale info in the language entry array here: https://github.com/dachcom-digital/pimcore-i18n/blob/master/src/I18nBundle/Context/I18nContext.php#L346