Hello! I have set up Default language "ru-RU" and additional language is "en-US". If I login as Admin (id=-1) then I don't redirect to default language nor to additional (considering by uncertain currency symbol - "¤"). How to redirect Admin to default language "ru-RU"?
Redirect admin to default language
-
- User
- Posts: 9438
- Make sure you have specified correct language ID in your language files, see Making Language Files. If the language ID is correct with region (i.e with "-RU" and "-US"), then the currency symbol is known and you will not get "¤".
- If you have customized the locale, double check your locale settings.
- The super admin is not an user from the users table, the language is not saved.
-
- User
- Posts: 267
- The language IDs are correct "ru-RU" and "en-US".
- I did. Looks like its ok.
- I don't use Super Admin (Hard-coded) option. User "admin" is from "users" table (dynamic user levels) with id = -1 and userLevelId = -1
Redirect after login works fine for all other users also if userLevelId = -1.
Only one user "admin" (id = -1) redirects incorrect (every login) - into "en-US" (not default "ru-RU") with strange currency symbol. For"en-US" locale currency is "$".
Is it possible somehow to force user "admin" (with id = -1) to redirect to "ru-RU" language?
-
- User
- Posts: 9438
If the admin is not super admin, you may save the language in Profile field (make sure you have enabled it first). e.g. in User_LoggedIn server event
// Save user language
if ($usr == "admin") Profile()->setUser($usr)->setLanguageId("ru-RU")->saveToStorage(); // Assume the user name is "admin"