I18next: 404 Error for unneeded locales

Created on 23 Feb 2016  路  2Comments  路  Source: i18next/i18next

I have a "pt-BR" locale. When I call it, it works as expected, downloading the /pt-BR/locale.json file as expected. But when I open the console there are two 404 requests calling for "dev" and "pt".

captura de tela 2016-02-23 as 07 11 19

Is it a normal behavior? By calling only "pt-BR" should't it just request that specific file?

question / configuration

Most helpful comment

default behaviour of i18next is to resolve translations in order:

1) de-DE (lng plus regional diffs)
2) de (lng)
3) en (defined fallbackLng)

so getting that not found is 'normal'.

you can change that behaviour with options:

  • fallbackLng = false
  • load = 'currentOnly'

All 2 comments

default behaviour of i18next is to resolve translations in order:

1) de-DE (lng plus regional diffs)
2) de (lng)
3) en (defined fallbackLng)

so getting that not found is 'normal'.

you can change that behaviour with options:

  • fallbackLng = false
  • load = 'currentOnly'

@jamuhl worked as expected. Thanks :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chiouchu picture chiouchu  路  4Comments

alakdam07 picture alakdam07  路  6Comments

mblanchette picture mblanchette  路  7Comments

MaxLeiter picture MaxLeiter  路  6Comments

karol-majewski picture karol-majewski  路  6Comments