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.

Switching Language?

See original GitHub issue

Hey guys,

just wanted to say great job on this amazing library! 👍

I’m wondering about one thing: is there a way to switch language more gracefully than renaming the language files? I found the different langEN.js etc. files in the lib folder and renaming the chinese lang.js to langCN.js and the english one to lang.js does switch the language, but wouldn’t it be much better to have some generic language option?

I.e. in the echarts API you can specify

lang: 'EN',

and it will load the langEN.js file? Is this already in place and have I missed it?

If not, I would be happy to contribute with something like this.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:27
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
100pahcommented, Nov 29, 2018

Current, switching language on runtime has not been supported. Language can only be switched on build stage, as this doc introduced:

node node_modules/echarts/build/build.js --lang en

And the pre-build artifacts of en version have been provided in echarts/dist/xxx-en.js.

2reactions
Karamutocommented, Dec 14, 2018

In highcharts this is possible simply calling a function: https://api.highcharts.com/highcharts/lang

Maybe this would be also an option for here? I really need this feature without the need to rebuild the library every time there is an update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code-switching
In linguistics, code-switching or language alternation occurs when a speaker alternates between two or more languages, or language varieties, in the context ...
Read more >
Linguistic Code-Switching: What it Is and Why it Happens
The first definition refers to the specific linguistic action of alternating or combining two or more languages. Unlike loanwords, which become permanent words ......
Read more >
Examining Language Switching and Cognitive Control ...
Language switching is a distinctive capability that reflects cross-linguistic activation and a systematic control of two languages (Kroll et al.
Read more >
How Brains Seamlessly Switch between Languages
The new study reveals how code switching—which some multilingual speakers worry is “cheating,” in contrast to sticking to just one language—is ...
Read more >
How to Fluently Switch From One Language To Another ...
Switching effortlessly between languages is a dream for many language learners. But how do you achieve it? Is it a realistic goal?
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