Internationalisation plug-ins: Columncontrol "search" control labels

Internationalisation plug-ins: Columncontrol "search" control labels

inforelainforela Posts: 5Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Hello,
I'm using internationalisation plug-in in order to get all my datatables labels in different languages. One of the languages I'm using is the spanish one.
These days I contribute with the translation of this language but there are some labels/text that I'm not getting able to get traduced and the spanish language plug-in is almost done (98%).
When I use in my datatable the Columcontrol Extension with the "search" content the labels are not traduced:

How can I get this control labels traduced?

Thanks,
Jon

This question has accepted answers - jump to:

Answers

  • sloloslolo Posts: 101Questions: 19Answers: 2

    Hi @inforela,

    I have already ask for this here and @allan has done the necessary.

    You juste have to translate the new sentences into your native language (If it hasen't already done so)

  • allanallan Posts: 64,640Questions: 1Answers: 10,686 Site admin
    Answer ✓

    Doh - I totally forgot about providing a way to provide a translation for them. I've added it now and will now go and add those keys to the i18n database.

    Thanks for flagging that up.

    Allan

  • inforelainforela Posts: 5Questions: 1Answers: 0

    Thanks a lot @allan
    I have edited Spanish and Basque languages in order to add this new labels.

    Great!!

  • allanallan Posts: 64,640Questions: 1Answers: 10,686 Site admin

    Brilliant - thank you!

    Allan

  • inforelainforela Posts: 5Questions: 1Answers: 0

    Hi @allan ,
    I'm trying to use the new translated labels but they are note getting translated in the columcontrol "search" control, maybe I'm doing something wrong.
    Here my demo : https://live.datatables.net/fuxasufe/1/edit

  • sloloslolo Posts: 101Questions: 19Answers: 2

    Really strange, if you compare the content on CDN https://cdn.datatables.net/plug-ins/2.3.2/i18n/es-ES.json and on this web page https://datatables.net/plug-ins/i18n/Spanish.html you can see that it misses this piece of text:

        "language": {
            "columnControl": {
                "search": {
                    "datetime": {
                        "equal": "Igual a",
                        "notEqual": "Diferente de",
                        "greater": "Mayor que",
                        "less": "Menor que",
                        "empty": "Vacío",
                        "notEmpty": "No vacío"
                    },
                    "text": {
                        "equal": "Igual a",
                        "notEqual": "Diferente de",
                        "starts": "Empieza con",
                        "ends": "Finaliza con",
                        "empty": "Vacío",
                        "notEmpty": "No vacío"
                    },
                    "number": {
                        "equal": "Igual a",
                        "notEqual": "Diferente de",
                        "greater": "Mayor que",
                        "greaterOrEqual": "Mayor o igual a",
                        "less": "Menor que",
                        "lessOrEqual": "Menor o igual a",
                        "empty": "Vacío",
                        "notEmpty": "No vacío"
                    }
                }
            }
        }
    

    Probably the CDN is not yet up to date following the latest changes.

  • sloloslolo Posts: 101Questions: 19Answers: 2

    You will find a working example here: https://live.datatables.net/fuxasufe/2/edit

    I have used a variable in order to initialize language but I also changed ColumnControl extension to v1.0.4 (in HTML headers) because in your exemple you are on the "old" v1.0.2.

  • sloloslolo Posts: 101Questions: 19Answers: 2
    Answer ✓

    Sorry, the right test case here: https://live.datatables.net/fuxasufe/3/edit

  • inforelainforela Posts: 5Questions: 1Answers: 0

    Hi @slolo ,

    Thanks for your asnwer. I did not notice CDN was not yet up to date.

    Now it's working!

  • allanallan Posts: 64,640Questions: 1Answers: 10,686 Site admin

    Exactly that, there hasn't been a release since those options were added. Perhaps I should look at providing a nightly. The other option is to host the file locally or embed it into your JS. Good to hear you've got it working now.

    Allan

  • inforelainforela Posts: 5Questions: 1Answers: 0

    Hi again,
    Yesterday a did not notice other problem with language and translation.
    Maybe @slolo you have solved this problem too:
    The calendar control is not getting translated when I define a column as 'searchDateTime' in the columncontrol but the language json has aparently this elements translated: https://live.datatables.net/fuxasufe/6/edit

  • allanallan Posts: 64,640Questions: 1Answers: 10,686 Site admin

    Interesting - thanks for letting me know about that. I'll look into it.

    Allan

  • allanallan Posts: 64,640Questions: 1Answers: 10,686 Site admin

    I've just committed a fix to address this problem. I'll make a release with the change later today or tomorrow.

    Allan

Sign In or Register to comment.