Take the 2-minute tour ×

I am having issues with Flask-babel. I cant create a translation for Japanese.

pybabel: error: unknown locale 'jp'

Is this a Flask-Babel issue?

That is the same error when a language does not exists. But, german works. So.....babel does nit support Japanese?

Is there an alternative to Babel that support a major language like Japanese?

share|improve this question
Japanese is ja. Not jp. So..figured it out –  Tampa Sep 23 '12 at 19:59
add comment

1 Answer

Babel does support Japanese and indeed, the error comes because 'jp' is not a valid locale.

Babel uses language codes from CLDR (which I believe are the standardized language codes from ISO et al). In your case the confusion comes from the language/territory split ('de' for German language, 'AT' for Austrian territory, 'DE' for Germany, ...).

The language code for Japanese is 'ja', territory is 'JP'. So you should use just 'ja' or 'ja_JP'.

share|improve this answer
add comment

Your Answer


