question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

select with lang="en" ignores language overrides

See original GitHub issue

A message override works only if the lang attribute is not set or if lang is set to any value except “en”. Tested with select2@4.0.13 and jquery@3.2 and confirmed in Chrome and Firefox on Mac and Win10.

$(document).ready(function() {
    $('.message-override').select2(
    {
      language: {
        noResults: () => {
          return 'override works';
        }
      }
    });
});
<select class="message-override">           <!-- works -->
<select class="message-override" lang="fr"> <!-- works -->
<select class="message-override" lang="en"> <!-- does not work -->

JSbin: http://jsbin.com/ludiyeg/edit?html,js,output

P.S. btw the JSbin template proposed in the issue editor is outdated, it should load the latest stable version but it points to an old release candidate instead.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kevin-browncommented, Aug 22, 2021

Weird, I’m not sure why it’s marking this as stale but let’s reset that.

0reactions
vjandreacommented, May 2, 2022

This issue is still relevant and not resolved yet.

Il lun 2 mag 2022, 00:41 stale[bot] @.***> ha scritto:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/select2/select2/issues/5995#issuecomment-1114354671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQKTO3XCLNFPMLARQMB6TVH4CBDANCNFSM4YUVR7XQ . You are receiving this because you authored the thread.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling Language Overrides - Bookshelf v7.8
Enabling Language Overrides · Choose View > Options. The Development Tools Options dialog box appears. · Click the Language Settings tab. · Under...
Read more >
Using Language Overrides in Joomla - YouTube
Language overrides allow you to change the text values of text in extensions in Joomla.Learn more about Joomla at ...
Read more >
Gnome overrides locale, ignores language settings
I have set up a system to have one user account overriding the system locale and use German instead of English in Gnome....
Read more >
Search: Find text across all loaded resources
Press Esc to open Drawer, and in the top-left corner, select Customize and control DevTools More Tools > Search. Press Command + Option...
Read more >
Language Overrides have arrived! - Joomlapolis
The long awaited language overrides have officially been implemented. You simply need to install the latest CB 2.x build.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found