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.

Is there a way to register all the languages at once? #v2

See original GitHub issue

I wanted to register all languages to switch between them dynamically. The documentation is not clear enough regarding this.

This is my code

  // numbro
  var numbro = require("numbro");
  var languages = require('numbro/dist/languages.min.js');

numbro.registerLanguage(languages['cs-CZ']);
numbro.setLanguage('cs-CZ');
formatedNum = numbro(num).formatCurrency(format);

In numeraljs, I can do the followings:-

const numeral = require('numeral');
require('numeral/locales');

numeral.locale('de');
formatedNum = numeral(num).format(format);

So, In numeraljs I don’t need to register each language first to be able to use it. Is there a way for numbrojs?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
BenjaminVanRyseghemcommented, Feb 7, 2018
let numbro = require("numbro");
let numbroLanguages = require("numbro/dist/languages.min.js");
Object.values(numbroLanguages).forEach((each) => numbro.registerLanguage(each));

numbro.languages();  // => lot of languages
0reactions
BenjaminVanRyseghemcommented, Apr 26, 2018

Thanks in advance 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to learn multiple languages at once - Lindie Botes
Yes, it is possible to learn many languages at once! ... You can consider the 80/20 approach if you're learning 2 languages at...
Read more >
Setting Up a Multi-Language Event - Cvent Community
Click the dropdown menu in the top-left, then click Build. In the Additional Content section, drag and drop Language Selector onto your header...
Read more >
I want to add/edit/delete my native and interested languages ...
Tap or Click the edit icon on the top right of your screen · Tap or Click your current native language or [Add...
Read more >
Can I learn two languages or more at the same time on this ...
Go to learn section, click the language name in the top, click Discover New Courses · Yes you can, But I wouldn't recommend...
Read more >
How to learn two languages at once? And should you do it?
00:45 Would I recommend learning 2 languages at the same time ? ... to find out HOW TO LEARN TO SPEAK A FOREIGN...
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