2
votes

I am confused with how to proceed on Internationalization & Localizations, so I categorized a website's data as follows :

  1. Site Content : Content that is hosted by the website i.e. the data about the subject. Eg: Mobile Phone Site (Data about mobile models, specs, prices, etc.)

  2. User Data : Data that is added by the users over time. Eg: Comments, reviews, profile info, etc.

  3. UI Text : Static text that changes with the UI (Template). Eg: Menus, Footer, Header, etc.

-- Hope I catgorized the data well.


Possible Tools for Translation :

  1. from django.utils.translation import ugettext
  2. What are other options ?

Translation Problem (Django) :

  1. Site Content (Dynamic) : How is possible to have .po files for Dynamic content from the database ? (Is ugettext the right tool ?)
  2. User Data (Dynamic) : How to translate this dynamic data ? (.po files ?) what if a user comments in English and other in Spanish ?
  3. UI Text (static) : This is static text that can be done with .po files and could change with templates. So, is there a better way ?

Please help.. How is i18n and l10n handled in practice ?

1

1 Answers

0
votes
  • UI text: gettext is the way to go.
  • User Data (Dynamic): Very simple: you don't translate it at all. The only things you could do is asking the users to provide more than one language (only few will do) or using machine translations (will piss of people - usually they prefer english over a crappy translation). Especially when translations like that get into the google index it's EXTREMELY annoying to get them instead of the original english content.
  • Site content: You need to provide a way for gettext to extract the strings you have in the database and they shouldn't change too often (otherwise it's an annoying amount of work). The alternative to using gettext would be storing multiple languages in the database.