Skip to content

Commit

Permalink
fix(*): Make default locale to be 'en', #3569 (#3573)
Browse files Browse the repository at this point in the history
  • Loading branch information
sstoyanovIG authored and bkulov committed Jan 11, 2019
1 parent 27ab63b commit 6ab52db
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
* ```
Expand All @@ -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
* <igx-calendar [locale] = "de"></igx-calendar>
* ```
Expand Down Expand Up @@ -610,7 +610,7 @@ export class IgxCalendarComponent implements OnInit, ControlValueAccessor {
/**
*@hidden
*/
private _locale = window.navigator.language;
private _locale = 'en';
/**
*@hidden
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*<igx-date-picker locale="ja-JP" [value]="date"></igx-date-picker>
*```
*/
@Input() public locale: string = window.navigator.language;
@Input() public locale: 'en';

/**
*An @Input property that sets on which day the week starts.
Expand Down
2 changes: 1 addition & 1 deletion projects/igniteui-angular/src/lib/grids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
if (this._locale) {
return this._locale;
} else {
return window.navigator.language;
return 'en';
}
}

Expand Down

0 comments on commit 6ab52db

Please sign in to comment.