Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize select2 language option #150

Open
bernhardmiller opened this issue Dec 22, 2021 · 0 comments
Open

Customize select2 language option #150

bernhardmiller opened this issue Dec 22, 2021 · 0 comments

Comments

@bernhardmiller
Copy link

Hello,

I'm currently integrating this library in one of my projects. Thank you for creating it, it really is a great experience so far!

I'm currently stuck with localizing the texts shown by select2 (eg the "No results found" message when there are no tags).
Usually, this is done with

$("#elem").select2({
  "language": {
      noResults: function () {
        return "Kein Ergebnis gefunden";
      },
  },
});

Is there a way to do this with tagulous? I tried with the autocomplete_settings like this:

tagulous.models.TagField(
    blank=True,
    autocomplete_settings={
        "language": {"noResults": "function() { return 'Keine Tags gefunden'; }"},
    },
)

but that did not work. Any help is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant