@@ -184,7 +184,7 @@ import { IgxGridValidationService } from './grid/grid-validation.service';
184184import { getCurrentResourceStrings } from '../core/i18n/resources' ;
185185import { isTree , recreateTree , recreateTreeFromFields } from '../data-operations/expressions-tree-util' ;
186186import { getUUID } from './common/random' ;
187- import { getI18nManager } from 'igniteui-i18n-core' ;
187+ import { getCurrentI18n , getI18nManager , ResourceChangeEventArgs } from 'igniteui-i18n-core' ;
188188
189189interface IMatchInfoCache {
190190 row : any ;
@@ -3498,15 +3498,16 @@ export abstract class IgxGridBaseDirective implements GridType,
34983498 protected platform : PlatformUtil ,
34993499 @Optional ( ) @Inject ( IgxGridTransaction ) protected _diTransactions ?: TransactionService < Transaction , State > ,
35003500 ) {
3501- this . locale = this . locale || this . localeId ;
3501+ this . locale = this . locale || getCurrentI18n ( ) || this . localeId ;
35023502 this . _transactions = this . transactionFactory . create ( TRANSACTION_TYPE . None ) ;
35033503 this . _transactions . cloneStrategy = this . dataCloneStrategy ;
35043504 this . cdr . detach ( ) ;
35053505 this . selectionService . selectedRowsChange . pipe ( takeUntil ( this . destroy$ ) ) . subscribe ( ( args : any [ ] ) => {
35063506 this . selectedRowsChange . emit ( args ) ;
35073507 } ) ;
35083508 IgcTrialWatermark . register ( ) ;
3509- getI18nManager ( ) . onResourceChange ( ( ) => {
3509+ getI18nManager ( ) . onResourceChange ( ( args : ResourceChangeEventArgs ) => {
3510+ this . locale = args . newLocale ;
35103511 this . _resourceStrings = getCurrentResourceStrings ( GridResourceStringsEN , false ) ;
35113512 } ) ;
35123513 }
0 commit comments