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

Cleanup: remove multiple language JS #344

Closed
Wolfr opened this issue Jan 21, 2021 · 1 comment
Closed

Cleanup: remove multiple language JS #344

Wolfr opened this issue Jan 21, 2021 · 1 comment

Comments

@Wolfr
Copy link
Contributor

Wolfr commented Jan 21, 2021

Remove this part of the code from prototype-nav.js:

/**
 * Multilanguage logic
 */

 function displayLanguageLabels(lang) {
  // Switch label on this page
  $('[data-lang][data-lang!='+lang+']').css('display', 'none')
  $('[data-lang='+lang+']').css('display', 'inline-block')
 }

 function checkLangSelected(lang) {
  $('#'+lang+'.br-prototype-langselector').prop('checked', true);
 }

$('.br-prototype-langselector').on('change',function() {
  var newLang = this.value;
  // Switch label on this page
  displayLanguageLabels(newLang)
  // Persist language selection
  navState.langSelected = newLang;
  saveNavState();
});

// Execute on each page refresh
checkLangSelected(navState.langSelected);
displayLanguageLabels(navState.langSelected);

We could work on removing any related language code.

@Wolfr Wolfr changed the title Remove multiple language JS Cleanup: remove multiple language JS Mar 9, 2021
@Wolfr
Copy link
Contributor Author

Wolfr commented May 10, 2021

Fixed in 1.29.1.

@Wolfr Wolfr closed this as completed May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant