Is there any way to change locale along with currency for admin in Magento2
-
21-12-2020 - |
سؤال
I want to update the currency and the rates for admin based on the user for which locale is set. For eg., if the locale is French, the currency should be French, but if the user is logged in from US locale it should be USD. The areas which I am referring to are, Dashboard, Orders grid/view, Products grid view.
المحلول
Yes this can be achieved by doing some customisation.
- Add a currency drop-down in add/edit user form at admin.
- Add and admin event observe for
contoller_action_predispatch
Then in this observer get selected currency for current admin and apply that currency to store manager object.
So this will be applicable for all admin pages.
نصائح أخرى
You can change locale from admin under System -> Configuration -> General
and currency from System -> Configuration -> Currency setup
لا تنتمي إلى magento.stackexchange