55 Output ,
66 TemplateRef
77} from '@angular/core' ;
8- import { getLocaleFirstDayOfWeek , NgTemplateOutlet , NgClass , DatePipe } from '@angular/common' ;
8+ import { NgTemplateOutlet , NgClass , DatePipe } from '@angular/common' ;
99import { Inject } from '@angular/core' ;
1010import {
1111 Component , Input , ViewChild , ChangeDetectorRef , ViewChildren , QueryList , ElementRef , OnDestroy , HostBinding
@@ -36,7 +36,7 @@ import { IgxInputGroupComponent } from '../input-group/input-group.component';
3636import { IgxSelectItemComponent } from '../select/select-item.component' ;
3737import { IgxPrefixDirective } from '../directives/prefix/prefix.directive' ;
3838import { IgxIconComponent } from '../icon/icon.component' ;
39- import { getCurrentResourceStrings } from '../core/i18n/resources' ;
39+ import { getCurrentResourceStrings , initi18n } from '../core/i18n/resources' ;
4040import { IgxIconButtonDirective } from '../directives/button/icon-button.directive' ;
4141import { IComboSelectionChangingEventArgs , IgxComboComponent } from "../combo/combo.component" ;
4242import { IgxComboHeaderDirective } from '../combo/public_api' ;
@@ -55,7 +55,7 @@ import { IgxDropDownItemNavigationDirective } from '../drop-down/drop-down-navig
5555import { IgxQueryBuilderDragService } from './query-builder-drag.service' ;
5656import { isTree } from '../data-operations/expressions-tree-util' ;
5757import { ExpressionGroupItem , ExpressionItem , ExpressionOperandItem , IgxFieldFormatterPipe } from './query-builder.common' ;
58- import { getI18nManager } from 'igniteui-i18n-core' ;
58+ import { getCurrentI18n , getI18nManager } from 'igniteui-i18n-core' ;
5959
6060const DEFAULT_PIPE_DATE_FORMAT = 'mediumDate' ;
6161const DEFAULT_PIPE_TIME_FORMAT = 'mediumTime' ;
@@ -219,12 +219,6 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
219219 */
220220 public set locale ( value : string ) {
221221 this . _locale = value ;
222- // if value is invalid, set it back to _localeId
223- try {
224- getLocaleFirstDayOfWeek ( this . _locale ) ;
225- } catch {
226- this . _locale = this . _localeId ;
227- }
228222 }
229223
230224 /**
@@ -546,7 +540,8 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
546540 protected platform : PlatformUtil ,
547541 private elRef : ElementRef ,
548542 @Inject ( LOCALE_ID ) protected _localeId : string ) {
549- this . locale = this . locale || this . _localeId ;
543+ initi18n ( _localeId ) ;
544+ this . locale = this . locale || getCurrentI18n ( ) ;
550545 this . dragService . register ( this , elRef ) ;
551546 getI18nManager ( ) . onResourceChange ( ( ) => {
552547 this . _resourceStrings = getCurrentResourceStrings ( QueryBuilderResourceStringsEN , false ) ;
0 commit comments