diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6699a11c8..bca483d18bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ All notable changes for each version of this project will be documented in this ## 7.1.1 ### Features - `igxGrid` - - `locale` property added. If not set, it returns browser's language. All child components will use it as locale. + - `locale` property added. Default value is `en`. All child components will use it as locale. ### Bug Fixes * onSortingDone is not fired when sorting indicator of a header in the group by area is clicked ([#3257](https://github.com/IgniteUI/igniteui-angular/issues/3257)) diff --git a/projects/igniteui-angular/src/lib/calendar/calendar.component.ts b/projects/igniteui-angular/src/lib/calendar/calendar.component.ts index fab1af6b0dc..5bb9d3abe59 100644 --- a/projects/igniteui-angular/src/lib/calendar/calendar.component.ts +++ b/projects/igniteui-angular/src/lib/calendar/calendar.component.ts @@ -142,7 +142,7 @@ export class IgxCalendarComponent implements OnInit, ControlValueAccessor { /** * Gets the `locale` of the calendar. - * By default the browser's language is used. + * Default value is `"en"`. * ```typescript * let locale = this.calendar.locale; * ``` @@ -156,7 +156,7 @@ export class IgxCalendarComponent implements OnInit, ControlValueAccessor { /** * Sets the `locale` of the calendar. * Expects a valid BCP 47 language tag. - * By default the browser's language is used. + * Default value is `"en"`. * ```html * * ``` @@ -610,7 +610,7 @@ export class IgxCalendarComponent implements OnInit, ControlValueAccessor { /** *@hidden */ - private _locale = window.navigator.language; + private _locale = 'en'; /** *@hidden */ diff --git a/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts b/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts index 98319bc0590..ffcd1a4874d 100644 --- a/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts +++ b/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts @@ -147,12 +147,12 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi public labelVisibility = true; /** - *An @Input property that sets locales. By default the browser's language is used. + *An @Input property that sets locales. Default locale is en. *```html * *``` */ - @Input() public locale: string = window.navigator.language; + @Input() public locale: 'en'; /** *An @Input property that sets on which day the week starts. diff --git a/projects/igniteui-angular/src/lib/grids/README.md b/projects/igniteui-angular/src/lib/grids/README.md index 93f3e07a04a..f57425913c8 100644 --- a/projects/igniteui-angular/src/lib/grids/README.md +++ b/projects/igniteui-angular/src/lib/grids/README.md @@ -186,7 +186,7 @@ Below is the list of all inputs that the developers may set to configure the gri |`transactions`| `TransactionService` | Transaction provider allowing access to all transactions and states of the modified rows. | |`summaryPosition`| GridSummaryPosition | The summary row position for the child levels. The default is top. | |`summaryCalculationMode`| GridSummaryCalculationMode | The summary calculation mode. The default is rootAndChildLevels, which means summaries are calculated for root and child levels. | -|`locale`| string | Determines the locale of the grid. By default returns browser's language. | +|`locale`| string | Determines the locale of the grid. Default value is `en`. | ### Outputs diff --git a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts index 9c2ba27092a..9a00914542d 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts @@ -302,7 +302,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements if (this._locale) { return this._locale; } else { - return window.navigator.language; + return 'en'; } }