ngx-datatable icon indicating copy to clipboard operation
ngx-datatable copied to clipboard

Add support to change the language of the whole component

Open rbarcelos opened this issue 8 years ago • 1 comments

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior I couldnt find a way to pass the language as parameter to this component.. Is there a way? I would like to make sure that any specific string is correctly translated to portuguese ( for example)

Expected behavior

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 0.8.x
  • Angular version: 2.0.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

rbarcelos avatar May 30 '17 08:05 rbarcelos

This is what I do to get my messages in spanish. Would be nice to just set lang property though

HTML

<ngx-datatable
 [...your configs]
 [messages]="my_messages"
 [...more configs]
> </ngx-datatable>

TYPESCRIPT

my_messages = {
    'emptyMessage': 'Sin datos para mostrar',
    'totalMessage': 'total',
    'selectedMessage': 'seleccionado'
  };

marcoalesan avatar Dec 13 '22 15:12 marcoalesan