ng-matero / extensions

Angular Material Extensions Library.
https://ng-matero.github.io/extensions/
MIT License
393 stars 48 forks source link

Translate mtx-select texts #197

Closed lilletech closed 1 year ago

lilletech commented 1 year ago

Hi,

I switch my lib ng-select to mtx-select. It works like a charm but these lines don't have any effects on the component. I need to customize text to the french language.

export class SharedModule {
  constructor(private ngSelectConfig: NgSelectConfig) {}

  configureNgSelect(): void {
    this.ngSelectConfig.notFoundText = `Aucun résultat`;
    this.ngSelectConfig.clearAllText = `Effacer tout`;
    this.ngSelectConfig.loadingText = `Chargement en cours`;
  }
}

(the sharedmodule imports & exports the MtxSelectModule)

Any idea to make it working ?

nzbin commented 1 year ago

I'm sorry, this is a lost feature. I will add it in the next version.

nzbin commented 1 year ago

Now 15.3.0 has support global config, please have a try.

{
  provide: MTX_SELECT_DEFAULT_OPTIONS, 
  useValue: {...}
}