Data Grid 2 - Translation of Filter Criteria

4
In order to translate an app using data grid 2 to another language I try to find a way to translate its filter criteria. Unfortunately, the terms “Contains”, “Starts with”, “Ends with”, “Greater than” and other captions don’t appear in Batch Translate of Studio Pro. Does anyone know if I missed something or isn’t that possible, yet.
asked
5 answers
1

My guess is that it is not yet possible. Might add it to the Datagrid2 wishlist: https://community.mendix.com/link/ideas/2633

answered
2

Created this piece of scss today. Just add this to ../web/components/_datagrid2.scss:

// Translate the label-texts of the Datagrid2-filters
html[lang="nl-NL"] .widget-datagrid .widget-datagrid-grid div.filter-icon {
  +div {
    //Hide the original text
    visibility: hidden;
    position: relative;

    //Reserve the room for the translation-text, by adding a pseudo-element
    &:after {
      visibility: visible;
      position: absolute;
      top: 0;
      left: 0;
      width: 175px;
    }
  }

  //Now add the translation-texts
  &.between+div:after {
    content: 'Tussen';
  }

  &.contains+div:after {
    content: 'Bevat';
  }

  &.startsWith+div:after {
    content: 'Begint met';
  }

  &.endsWith+div:after {
    content: 'Eindigt met';
  }

  &.greater+div:after {
    content: 'Is groter dan';
  }

  &.greaterEqual+div:after {
    content: 'Groter of gelijk';
  }

  &.equal+div:after {
    content: 'Gelijk aan';
  }

  &.notEqual+div:after {
    content: 'Niet gelijk';
  }

  &.smaller+div:after {
    content: 'Kleiner dan';
  }

  &.smallerEqual+div:after {
    content: 'Kleiner of gelijk';
  }

  &.empty+div:after {
    content: 'Is leeg';
  }

  &.notEmpty+div:after {
    content: 'Niet leeg';
  }

  &.notEqual+div:after {
    content: 'Niet gelijk';
  }

}

Only to find that Andries Smit solved this 3 months ago too. Great job Andries.

answered
0

I think I read these foreseen translations were mostly made in Dutch-English translations. As far as I know, batch translation is mostly used to export an Excel file of all captions that need to be translated, so someone can simultaneously translate while the development team develops. Once finished, the Excel file can then be imported again and multilingual content will be a fact.

answered
0

Hello, 

 

There's a workaround to translate these texts via CSS:

answered
0

I could not find the datagrid2.css file in 10.9.

But placing it in the datagrid.css solves the problem.

answered