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.

How to get the current language name?

See original GitHub issue

Hello,

in a component we can get the current language code with $i18n.locale, but how to retrieve its name? $i18n.name doesn’t work.

Thank you

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
rchlcommented, Jun 15, 2021

this.$i18n.localeProperties has all the properties of the current locale so this.$i18n.localeProperties.name should work.

1reaction
divinecommented, Jun 15, 2021

Hello,

Have you seen this example https://i18n.nuxtjs.org/lang-switcher?

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Get the current language in device - Stack Overflow
You can use Locale.getDefault().getLanguage(); to get the usual language code (e.g. "de", "en"). – muscardinus.
Read more >
How to Get the current language in Android device?
This example demonstrate about how to Get the current language in Android device. Step 1 − Create a new project in Android Studio,...
Read more >
How to Get Current Language with WPML
The wpml_current_language hook is the recommended way to get the current language of your site. One way to use this hook is to...
Read more >
How to detect current selected language?
You can get the code of the current selected language with JavaScript using the following piece of code: ... return c.substring(name.length, c.length);
Read more >
How to output the website's current language name?
You can set the title of the language under Setup->Languages in the backend. Best, Nils. Like 4 ...
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