Completed
Last Updated: 10 Apr 2020 11:04 by ADMIN
James
Created on: 03 Apr 2020 13:02
Category: Filter
Type: Bug Report
0
Localization doesn't work in the filter control.
Based on your demos (https://demos.telerik.com/kendo-ui/filter/index), it seems it is impossible to get the filter control to use localized messages just by loading the required language file (other controls seems to switch language OK).   Whilst it is possible to have completely custom text using the configuration api, it should still be possible to have defaults for the main languages supported.
1 comment
ADMIN
Denitsa
Posted on: 10 Apr 2020 11:04

H James,

Officially we support only English messages, whereas translations to other languages are community-driven (see the Contribution section of the documentation for more details). For that reason, translations to other languages may be incomplete or could be missing. Community members can fill the gaps and add missing messages or even new message files for languages that we don't have translations in yet.

 

To update the files with the missing messages, download the files for the languages you want to use, add the translations and load these updated files in your application, instead of the message files from our CDN that don't contain the messages.

For the Filter widget, the needed sections where the translation should be substituted are:

if (kendo.ui.Filter) {
kendo.ui.Filter.prototype.options.operators =
$.extend(true, kendo.ui.Filter.prototype.options.operators,{
  "string": {
    "eq": "Is equal to",
    "neq": "Is not equal to",
    "startswith": "Starts with",
    "contains": "Contains",
    "doesnotcontain": "Does not contain",
    "endswith": "Ends with",
    "isnull": "Is null",
    "isnotnull": "Is not null",
    "isempty": "Is empty",
    "isnotempty": "Is not empty",
    "isnullorempty": "Has no value",
    "isnotnullorempty": "Has value"
  },
  "number": {
    "eq": "Is equal to",
    "neq": "Is not equal to",
    "gte": "Is greater than or equal to",
    "gt": "Is greater than",
    "lte": "Is less than or equal to",
    "lt": "Is less than",
    "isnull": "Is null",
    "isnotnull": "Is not null"
  },
  "date": {
    "eq": "Is equal to",
    "neq": "Is not equal to",
    "gte": "Is after or equal to",
    "gt": "Is after",
    "lte": "Is before or equal to",
    "lt": "Is before",
    "isnull": "Is null",
    "isnotnull": "Is not null"
  },
  "enums": {
    "eq": "Is equal to",
    "neq": "Is not equal to",
    "isnull": "Is null",
    "isnotnull": "Is not null"
  }
});
}

if (kendo.ui.Filter) {
kendo.ui.Filter.prototype.options.messages =
$.extend(true, kendo.ui.Filter.prototype.options.messages,{
  "apply": "Apply",
  "and": "And",
  "or": "Or",
});
}

 

Regards,
Denitsa
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.