How to change default language in aimeos and how to get product data in that specific language

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
awaidqureshi
Posts: 86
Joined: 12 Jan 2019, 15:17

How to change default language in aimeos and how to get product data in that specific language

Post by awaidqureshi » 08 Oct 2019, 09:30

How to change default language of aimeos and how can i get the data of product with that changed language

Please guide me about this
Thanks

User avatar
aimeos
Administrator
Posts: 8057
Joined: 01 Jan 1970, 00:00

Re: How to change default language in aimeos and how to get product data in that specific language

Post by aimeos » 09 Oct 2019, 11:34

Change the order of the entries in the "Locale" panel. The first language/currency combination is the default one.
In the frontend, you will automatically get the texts for the default language.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

awaidqureshi
Posts: 86
Joined: 12 Jan 2019, 15:17

Re: How to change default language in aimeos and how to get product data in that specific language

Post by awaidqureshi » 10 Oct 2019, 07:36

aimeos wrote: 09 Oct 2019, 11:34 Change the order of the entries in the "Locale" panel. The first language/currency combination is the default one.
In the frontend, you will automatically get the texts for the default language.
Screenshot_2.png
Screenshot_2.png (28.89 KiB) Viewed 3611 times
Are you talking about this.

Can u guide me how it will work.

User avatar
aimeos
Administrator
Posts: 8057
Joined: 01 Jan 1970, 00:00

Re: How to change default language in aimeos and how to get product data in that specific language

Post by aimeos » 10 Oct 2019, 10:18

Add an entry with the language and currency you want if it doesn't exist yet and set position to 0. Remove the other entries you don't need and make sure only one is at position 0.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dochr
Posts: 8
Joined: 03 Nov 2021, 17:18

Re: How to change default language in aimeos and how to get product data in that specific language

Post by Dochr » 14 Apr 2022, 22:29

I have a similar problem.
With just two languages, I have ensured that their order in Locale tab is proper, with only one language with Position 0.
In the dropdown menu, the order is correct, however, when the site is loaded, it still picks up incorrect language as a default:

Is there something in the configuration I can change in order to make this work?

Additionally - is there a way to preserve a language selected when clicking on the menu in the top left corner? It seems that it resets to default value.
Attachments
LocaleSelect.jpg
LocaleSelect.jpg (140.07 KiB) Viewed 2227 times

User avatar
aimeos
Administrator
Posts: 8057
Joined: 01 Jan 1970, 00:00

Re: How to change default language in aimeos and how to get product data in that specific language

Post by aimeos » 16 Apr 2022, 08:01

Check for:
- Caching ("php artisan aimeos:clear" to flush caches)
- Default locale in ./config/app.php
- SHOP_MULTILOCALE=true in .env file
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dochr
Posts: 8
Joined: 03 Nov 2021, 17:18

Re: How to change default language in aimeos and how to get product data in that specific language

Post by Dochr » 20 Apr 2022, 10:00

Thank you, ./config/app.php had locale set to "en", and in .env file there was no mention of SHOP_MULTILOCALE, so I added it.
The site now no longer defaults to "en" version.

Post Reply