My app has tables for languages and countries (actually django-countries at the moment, but open for suggestions). The tables are populated when I initialize the database an开发者_JAVA百科d remain static after that.
What would be the ideal localization mechanism for the contents of these tables, so that I can show the country and language names to users in their chosen site language?
I'm aware of projects like django-multilingual and transdb, but IMO they are more suitable for dynamic content, i.e. stuff that's supposed to be modified.
Please englighten me!
Maybe I'm missing something here, but why just not use [un]gettext, i.e. {% trans lang_from_db %}
and _(lang_from_db)
?
Alternatively, hardcode language names translated in their own language into database, e.g "English", "Svenska", "Suomi", etc.
精彩评论