VirtoCommerce / vc-platform

Virto Commerce B2B Innovation Platform
https://virtocommerce.com
Other
1.23k stars 844 forks source link

RTL localization enhancement #743

Closed tatarincev closed 4 years ago

tatarincev commented 7 years ago

ui-grid - add globally for actions column '{ name: 'actions', displayName: '', enableColumnResizing: false, enableSorting: false, width: 30, cellTemplate: 'list-actions.cell.html', pinnedRight:isRTL , pinnedLeft: !isRTL }'

Change datpicker and date format to persian calendar (jalali) has specific requirement and different from Gregorian calandar

alireza-salehi commented 7 years ago

for ui-grid correct RTL support following configurations are needed:

  1. 'dir' attribute on grid tag with 'rtl' value in RTL mode. for example: <div ui-grid="gridOptions" dir="rtl" ui-grid-auto-resize ui-grid-save-state ui-grid-selection ui-grid-resize-columns ui-grid-move-columns ui-grid-pinning ui-grid-height></div>
  2. pinned columns must pin to right instead of left. for example: '{ name: 'actions', displayName: '', enableColumnResizing: false, enableSorting: false, width: 30, cellTemplate: 'list-actions.cell.html', pinnedRight: true}' 'pinnedLeft' must be removed (or set to false when both present) from column configuration in RTL mode.

rtl ltr

asvishnyakov commented 7 years ago

+ Now you need to reload page to correct apply RTL changes to UI, while translate for languages applied immediately

alireza-salehi commented 7 years ago

very simple to reload: VirtoCommerce.Platform.Web\Scripts\app\userProfile\blades\userProfile.js you need to edit setLanguage like this: $scope.setLanguage = function () { $translate.use(blade.currentLanguage); location.reload(); };

asvishnyakov commented 7 years ago

@alireza-salehi thank you, but I know it :) it's just note to not forget it when we'll fix RTL support

tatarincev commented 4 years ago

This feature request has been closed and added to the internal product backlog. https://virtocommerce.atlassian.net/browse/PRD-85