Site Specific Languages
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 40
- Joined: 02 Dec 2021, 17:18
Site Specific Languages
How I can fetch set specific languages that are enabled for particular site at admin panel;
so that I can show them in a dropdown at frontend to switch between languages...
TIA
so that I can show them in a dropdown at frontend to switch between languages...
TIA
Re: Site Specific Languages
You can use the locale manager to get the available languages for a site:
Code: Select all
$manager = \Aimeos\MShop::create( $this->context(), 'locale' );
$filter = $manager->filter( true )->add( ['locale.siteid' => $this->context()->locale()->getSiteId()] );
$langIds = $manager->search( $filter )->getLanguageId()->unique();
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star