Missing the key for above option..... "DoesNotContain" does not work.
Thx. for any help
Dschuli
Hi Julius,
Greetings from Syncfusion support
Based on your requirement, you want to localize the EJ2 Grid in your project with Grid filter operators.
By default, we have used en-US culture in the EJ2 Components. If you want to use different culture in EJ2 Components, you need to load the corresponding CLDR files for the respective cultures. By using setCulture method you can change the culture as you want. Based on your requirement we have prepared a sample and achieved your requirement, please refer the below code example, sample and documentation for more information.
|
import * as cagregorian from '../locale/ca-gregorian.json'; import * as currencies from '../locale/currencies.json'; import * as numbers from '../locale/numbers.json'; import * as timeZoneNames from '../locale/timeZoneNames.json'; import fr from '../locale/fr.json';
loadCldr(cagregorian, currencies, numbers, timeZoneNames); // load json cldr files
L10n.load(fr); setCulture('fr'); // Change the culture of Syncfusion component setCurrencyCode('EUR'); // Change the currency code |
Grid Internalization:
https://ej2.syncfusion.com/angular/documentation/grid/global-local/#internationalization
https://ej2.syncfusion.com/angular/documentation/common/globalization/internationalization
Sample:
Screenshot:
Regards,
Rajapandi R
Thanks for the quick answer, Rajapandi.
As I understand - according to docs, you have to provide the translations for non-US in your code Like:
L10n.load({
'de-DE': {
grid: {
EmptyRecord: 'Keine Aufzeichnungen angezeigt',
GroupDropArea: 'Ziehen Sie einen Spaltenkopf hier, um die Gruppe ihre Spalte',
UnGroup: 'Klicken Sie hier, um die Gruppierung aufheben',If there is an existing translation definition for (in my case German), I'd like instructions on how to access/use (have not found anything about that in the docs). It would even help to get a list of all properties/keys of the translation object for the different (parts of a) control.
Anyhow, I did create my own L10n.load definition, but it does not work for the text-filter item "Does not contain",
So I assume the key "Does NotContain" is incorrect and I'm looking for the correct one.
Thanks for your help!
Ju
Julius,
Since you like to translate the text using keywords, you can use the "NotContains" keyword to achieve your requirement. Please refer the below code example for more information.
|
StartsWith: 'Beginnt mit', EndsWith: 'Endet auf', Contains: 'Enthält', NotContains: 'enthält nicht', DoesNotContain: 'Enthält nicht', Equal: 'Gleich', NotEqual: 'Ungleich', LessThan: 'Kleiner', LessThanOrEqual: 'Kleiner/Gleich', GreaterThan: 'Größer', GreaterThanOrEqual: 'Größer/Gleich',
|
Thanks, Rajapandi.
That was the info I was looking for - works perfectly. I did my own translations as I was unaware of the @syncfusion/ej2-locale package (did not find any hint for this in the grid docs). This package makes life a bit easier ......
Julius,
We are happy to hear that our provided solution was helpful to achieve your requirement.
Please get back to us if you have any further assistance.