Skip to content

Commit

Permalink
fix(*): Make default locale to be 'en', #3569
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
sstoyanovIG committed Jan 10, 2019
1 parent 2fee695 commit 8c5fc6d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes for each version of this project will be documented in this
- `IgxTimePickerComponent`: in addition to the current dialog interaction mode, now the user can select or edit a time value, using an editable masked input with a dropdown.

## 7.1.1
- `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))
* igx-grid isn't displayed properly in IE11 when it is inside an igx-tabs-group ([#3047](https://github.com/IgniteUI/igniteui-angular/issues/3047))
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 @@ -146,12 +146,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 8c5fc6d

Please sign in to comment.