For shops offering multiple languages, currencies or both, Aimeos contains a locale selector component that renders menus of the configured language/currency combinations, so visitors are able to choose their preferred language and/or currency. By default, both will be part of the URL afterwards.
How to add locales for language/currency combinations is described in the user manual.
To make the locale selector available in the templates, you need to add the component name to the page configuration. Add these settings for the "page" configuration in your ./Configuration/Settings.yaml file:
They add the "locale/select" component to the account, basket, catalog detail and catalog list templates where they can be rendered afterwards.
In Flow/Neos applications, you can overwrite the templates of packages by copying a modified version of the template to the ./Packages/Application/Your.Package/Resources/Private/Templates/ directory and configuring that path as additional template path in your "./Configuration/Views.yaml":
In each page template where the locale selector should be available, you need to add the lines for rendering the header and body section of the locale selector:
Templates that should be modified:
Depending on the section you've added the body of the locale selector to, it will be rendered at different places.
Language and currency ID chosen by the visitor are part of the URL by default, so they are explicit and can be cached (contrary to information based on session data). To make this work, you need to redefine all routes besides the "*adm" (admin) routes with a prefix in your ./Configuration/Routes.yaml:
The locale selector is a normal component with subparts, that can be adapted like any other component. If you e.g. only need a language or currency menu, you can remove the subpart you don't need via the client/html/locale/select/standard/subparts configuration.
Adapting the layout of the locale selector is possible via CSS.