Questions tagged [i18next]

i18next is a full-featured i18n javascript library for translating your webapplication.

i18next is a full-featured i18n javascript library for translating your webapplication.

1430 questions
7
votes
1 answer

(0, _reactI18next.translate) is not a function

Actually I am new to react native and here I am trying to change language to Arabic using 'react-i18next' but when executed the following error ocures ReactNativeJS ▶︎ (0, _reactI18next.translate) is not a function. (In '(0,…
Pranav Ashok
  • 581
  • 1
  • 6
  • 18
7
votes
2 answers

React and i18n - translate by adding the locale in the URL

Hello I'm building a demo application just to learn React and I'm kinda stuck with the translation proccess. What I'm trying to do is have a multi-language website with default language the "Greek" and secondary "English". When Greek are enabled the…
IseNgaRt
  • 601
  • 1
  • 4
  • 22
7
votes
1 answer

Getting i18next translator Missing key

This is my first time with i18next and I have no idea how to make it work. (it seems like the documentation is incomplete to me) This is my HTML code with i18next
Aditya Tomar
  • 175
  • 1
  • 3
  • 9
7
votes
1 answer

Trouble with detecting browser language and using it with i18next

I'm working on a webapp. I'm using i18next and it doesn't detect language unless I specify "lng" on options. If I use "navigator.language || navigator.userLanguage" and it's OK with Chrome. It returns something like "en". But Firefox for example,…
mutlucan96
  • 407
  • 1
  • 5
  • 12
7
votes
3 answers

i18next Displayed key instead of value

I have translation.json file in /locales/en/ { "app": { "name": "Example App" } } In html, I have: In js: $(document).ready(function() { var language_complete = navigator.language.split("-"); …
JR Galia
  • 17,229
  • 19
  • 92
  • 144
7
votes
2 answers

Autoloading of Namespaces i18next

I'm using I18Next as a Javascript-based Translation Solution, and here's what needs to happen: A default namespace "Core" is loaded. It contains most keys I want, but not all of them. There is no fixed list of namespaces: hence I cannot just tell…
Jimmie Lin
  • 2,205
  • 2
  • 23
  • 35
6
votes
1 answer

How to handle i18next new type DefaultTFuncReturn?

Yesterday, i18next introduced a new return type DefaultTFuncReturn, I am trying to upgrade this dependency with a whole bunch of errors. This is because it used to return a string, now it returns DefaultTFuncReturn every time I use the…
davidaap
  • 1,569
  • 1
  • 18
  • 43
6
votes
1 answer

How to add Dynamic RTL support for NEXT.js Material UI Emotion

I am using nextjs v12.2, @mui/material v5.9, next-i18next v11.3 I am trying to implement dynamic Rtl/Ltr support based on changing language I used this example for integration of Next.JS with Material UI v5 and this document to change the direction…
hmd.fullstack
  • 478
  • 1
  • 7
  • 20
6
votes
1 answer

next-i18next translation not working in storybook, console logs missingKey

I am setting up storybook and for my translations I am using next-i18next. This is How I set it up: // .storybook/i18n.js import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; i18n.use(initReactI18next).init({ fallbackLng:…
Mähnenwolf
  • 720
  • 10
  • 30
6
votes
2 answers

Server Next js automatically redirect to english despite browser has another language

Server Next.js automatically redirect to english despite browser has another language http://localhost:3000/en instead http://localhost:3000. My next-i18next.config module.exports = { i18n: { locales: ['ua', 'en', 'ru', 'ar'], …
Roman
  • 61
  • 1
  • 2
6
votes
1 answer

React, i18next and html attr lang

I use React+i18next and have two languages on my website. How to make change HTML 'lang' attribute on my page? I use i18next-browser-languagedetector but lang attr does not change
6
votes
0 answers

How to handle nesting and organizing your translation keys using i18next and react-i18next? and other best practices questions

I have a couple of questions about best practices and the workflow when working with i18n I am currently using react-i18next I am defining the keys directly with default values in the components and then extracting them using…
6
votes
1 answer

Internationalization of p-calendar (primeNg + i18next)

I am using the internationalization-framework called i18next. One of my components is a p-calendar but I don't know how to internationalize it with this framework. Does anyone know how I can internationalize this component with i18next? If someone…
Alba
  • 422
  • 2
  • 9
  • 20
6
votes
4 answers

i18next warn or lint on missing key for a language (not the fallbackLng)

My project is using i18next and react-i18next with success so far. No localize or server side involved. Current setup: - default & fallback language: en - additional language: fr I wanted to automate some things related to error checking: 1.…
Hugo Gresse
  • 17,195
  • 9
  • 77
  • 119
6
votes
3 answers

How to use react-i18next in a utility function outside the component tree?

I followed the react-i18next docs and internationalized my React app. I use the useTranslation hook, which gives me the "t" object. All nice and smooth for now, but I have some non-Hook utility functions which are outside the component tree. How to…
Paul Razvan Berg
  • 16,949
  • 9
  • 76
  • 114