How to hide languages from back-end ?

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!
MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

How to hide languages from back-end ?

Post by MikaelNazarenko » 25 Jul 2019, 16:47

I want to hide unnecessary languages from back-end. Also I want somehow make it to save selected language. Thanks a lot!

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

Re: How to hide languages from back-end ?

Post by aimeos » 25 Jul 2019, 20:18

In the Locale -> Language panel you can enable/disable the languages you need and want to use
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: How to hide languages from back-end ?

Post by MikaelNazarenko » 26 Jul 2019, 05:51

Why after I deleted language from Locale->language it still shown at Language tab ? How to remove language from Language tab ? Also how can I set another language ? So when user log in to admin another language will be used ?

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

Re: How to hide languages from back-end ?

Post by aimeos » 26 Jul 2019, 09:26

If there are still languages in the locale tab you've changed, you only disabled them - which is OK. They will not be shown in the frontend and the backend any more. You can also remove the combinations in the Locale list if you want.

The language of the user depends on (in this order):
- lang parameter in the URL
- langid in the users table
- default locale setting (./config/app.php in Laravel)
The easiest way to change it is to set the locale in your configuration.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: How to hide languages from back-end ?

Post by MikaelNazarenko » 26 Jul 2019, 11:06

Hmm, I have removed couple languages from Locales->LAnguages, But they still shown there:

https://prnt.sc/okc650

You see Arabic language is missing in list table but it shown on first position on lang tab where user may select the language. How can I hide or remove languages from exactly that lang tab ?

Also I have changed these configs in config/app :

Code: Select all

'locale' => 'en',
'fallback_locale' => 'en',
To

Code: Select all

'locale' => 'de',
'fallback_locale' => 'de',
But the language in aimeos admin is still English

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

Re: How to hide languages from back-end ?

Post by aimeos » 26 Jul 2019, 14:03

The list of available translations is independent from the list of configured languages:
https://github.com/aimeos/ai-admin-jqad ... d.php#L300
You have to overwrite the page template if you want to limit that to a few particular languages.

These lines are responsible for the used language in the admin interface:
https://github.com/aimeos/aimeos-larave ... hp#L51-L56
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: How to hide languages from back-end ?

Post by MikaelNazarenko » 26 Jul 2019, 16:20

Great thank you! I got it )

Post Reply