Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default locale to be 'en' #3573

Merged
merged 1 commit into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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