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 use i18n in a CLI style app with a dependency that uses i18n? Currently loosing dependent modules messages.

See original GitHub issue

We depend on a library module (in our package.json) that also translates messages using i18n. In this library module they set the following:

var i18n = require('i18n');
i18n.configure({
    directory: __dirname + '/../messages',
    defaultLocale: 'en',
    updateFiles: false
});

In our applications script file we do a similar setup. As a result it seems like our i18n.configure() overrides our dependencies setup and the only way we can get messages is to include all the messages from our dependent module in our application. Is this expected? Is there a way we can work around this in either the library or main application?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
markjbyrne81commented, May 8, 2018

Hi @mashpie,

Is this pull request likely to get reviewed anytime soon?

1reaction
mashpiecommented, Nov 10, 2017

#323 or #329 - still need to get reviewed. And still my time is far too limited atm 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular i18n: internationalization & localization with examples
In this article you will learn with examples how to get started with Angular I18n using the built-in internationalization module.
Read more >
Unable to Resolve Module in React Native App - Stack Overflow
Based on your folder structure, try import like this in index.js: import { AppContainer } from './App/AppContainer';. If you are using a named ......
Read more >
i18n - npm
Lightweight simple translation module with dynamic JSON storage. Supports plain vanilla Node.js apps and should work with any framework (like ...
Read more >
GNU gettext utilities
GNU gettext is designed to minimize the impact of internationalization on ... the localization functions known to all modules needing message translation.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, ... Bug:172874 - "media-tv/linuxtv-dvb-apps fails due to i18n error(?)" ...
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