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.

i18next language resources - keys displayed

See original GitHub issue

Hey!

I’ve got a question regarding the i18next language resources app.t('key'):

app.tell(app.t('WELCOME'));

const languageResources = { 'de-DE': { translation: { WELCOME: 'Willkommen', }, }, };

From Google Action Simulator:

output: ‘Willkommen’

From Dialogflow Debugging

output: ‘WELCOME’

What’s the reason for this behaviour? I would expect that the output is the same. Thanks for your great work!

Best regards

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
aswetlowcommented, Jan 12, 2018

That’s weird. Shouldn’t be a problem with the speech builder. Could you add an Englisch locale to your language resources? What’s the output for app.getLocale() ?

0reactions
Catharsis68commented, Jan 12, 2018

update: found the issue, the problem was the wrong locale send from within Dialogflow Console / Web Demo. Dialogflow is setting the language code to en-US instead of de-DE => added the translation for en-US and now it works.

Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Essentials - i18next documentation
Accessing keys in different namespaces ... Namespaces are a feature in i18next internationalization framework which allows you to separate translations that get ...
Read more >
Can I get full list of resource keys · Issue #1187 · i18next/react ...
And I would iterate through all the supported languages in my app. Firstly I need the full list of resource keys.
Read more >
i18next - features
If a resource key isn't resolvable (en-US -> en -> fallbackLng) than normally the key would ... Hint: i18next provides the functionality for...
Read more >
i18next Displayed key instead of value - Stack Overflow
if you don't do that, your resources will not be loaded, and translation values will fallback to their respective keys (see the source...
Read more >
A Guide to React Localization with i18next | Phrase
Resource » If you want to start at this point and just focus on the i18n ... to our app—and to show her...
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