igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Feature Request : locale property on a grid level

Open AdrienKegler opened this issue 7 years ago • 1 comments

Description

Currently filteringService and grid's filtering UI are formatting dates using browser's window.navigator.language. IgxDatePicker and IgxInputGroup components, which are used in the filtering UI are flexible and support different locales. Currently there is no easy way to change the locale in the grid.

So whenever a user is using a language different from English on his browser, we need to provide the corresponding angular locale (as explained here) in order to avoid errors for missing pipes during the formatting.

To avoid the import of numerous amount of angular locales when a user may need only one of those and/or to avoid language inconsistency when the website/webapp isn't translated in the user's browser's language. It would be preferable to let the developer choose the language for the whole grid.

Potential Solution (credits goes to Borislav Kulov)

Provide a locale property on a grid level that will ensure that all grid's child components will be using that same locale and the grid will stay in the desired language even if the browser's locale is different.

Expected result

A [locale] input on the <igx-grid> tag that will behave as it does on the <igx-date-picker> tag Eventually, the default value should be 'null' in order to prevent this change to be a "breaking change" and still allow people to custom the locale child by child

Attachments

Initial Discussion https://www.infragistics.com/community/forums/f/ignite-ui-for-angular/119335/manually-programatically-set-locale-for-igxgrid-s-filter-s-datepickers/529961#529961

AdrienKegler avatar Dec 17 '18 13:12 AdrienKegler

@AdrienKegler We will plan this for one of our next Sprint and will let you know once done :)

SlavUI avatar Dec 18 '18 15:12 SlavUI