Select text is always visible if using language option

Select text is always visible if using language option

sim24sim24 Posts: 6Questions: 3Answers: 0

Link to test case: https://jsfiddle.net/qcapwjLx/

Description of problem: I'm trying to setup translations for a dataTable with select enabled. Before using the language option, the selection text only appears in case a row is selected (example 1) . But if I try to translate the text, they seem always on (example 2). Am I missing something ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Answer ✓

    Add:

    '0': '',
    

    to your language.select.rows object. The _ is a catch all that will be used unless there is another string for the number in question. In this case you want 0 to be an empty string. Equally, you could put "Click a row to select it", or similar.

    Allan

  • sim24sim24 Posts: 6Questions: 3Answers: 0

    @allan Thanks, works a charm ! :smiley:

    Given that it's the default behaviour, I wonder why none of the ready-made translations include it...

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin

    Looks like an error! I'll look into that.

    Allan

Sign In or Register to comment.