What we mean by internationalization?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Gábor Hojtsy's picture

The goal of this group is something that we should define up front. When I write this text, Drupal 4.7.x is stable, and we are going to release Drupal 5.0 in a few weeks. Still Drupal 5.0 is only going to have interface translation services, supporting the display of the built in interface strings in different languages. There is an i18n module addon however, which is badly needed.

The goals of a truly international site are actually much wider then just interface translation. One needs to translate user defined items like menus, the site slogan, titles of custom blocks, even the site logo image. Whenever you start adding content to the site, you might want to add it in different languages. Sometimes you might need attachments from one post in the translated one, sometimes not. You might even need calendars to adapt to monday or sunday starting a week with different languages. All these issues need to be solved, and new issues will come up along the way. The goal of this group is to come up with questions, and ensure that we find adequate answers for them.

Comments

Alternative content

aries's picture

As I suspected before, there are two sides of i18n: data schema side and content creator side. In the data schema side you can mark a building block (eg. a form element, a content type field instance) which can be alternate. On the content creator side, when you fill the content, you can set the criteria and the result.
Eg:

  • if $language is Hungarian, then the title should be ...
  • if the $language set to English, the default currency should be USD
  • if the $culture is european, $design_should_be = fancy :]

This approach can be general not for only i18n.

The main dilemma is how the alternate building blocks and their parent item? As a new attribute? As a new item (like translated node with new node id)?

Aries

Aries

no just these two

Gábor Hojtsy's picture

There are more sides of the issue then you describe. You need to take the APIs into account for example, since thoswe will surely need to change... Abour your main dilemma: yes, we need to come up with ideas about solutions. The current i18n.module solution is debated because we were not discussing the alternatives, and we are given a solution, which is not thought of as the best by some developers.

a definition

Jax's picture

Internationalization for me is enabling localization. The i18n part refers to the possibilities of the software. L10n is configuring the software to a specific locale.

So you can enable your software to support different languages or different regions (en vs en-us and en-uk). I think it should be clear what kind of 18n you want to introduce to drupal before development is started. I would like to suggest to limit it to only language.

Also, currently drupal assumes 'en' as the base language. This is a pain for people who want to use drupal without the english language enabled. Because if people make menu item's they have to be in english first (locales_source vs. local_target).

In my opinion there are only 3 types of 'translatables' (I don't want to use content, but I mean stuff that needs to be translated):

  • labels
  • content
  • mixed

In the Drupal currently the interface is treated as labels and the nodes as content. Taxonomy is also handled as 'content' (I think, I'll have to check again) but it would be better if they were treated as labels.

How the underlying menu and content presentation works is all dependent on the choices made before. The i18n module currently does a lot right, only the navigation is a bit incomplete (but can be solved: http://drupal.org/node/76631)

For the ecommerce products having a separate node for each language isn't a good idea because when you translate a product you end up with a different node id for the new product and if you use the node id as reference you cannot reference the single fysical product anymore.

hmmm.. I'm going to stop rambling now. Anyway, I am really rooting for i18n in core in Drupal because I always need it. So I'll keep an eye on the groups and help/test/suggest where I can.

I was just about to comment

rkerr's picture

I was just about to comment on your same point.

Internationalization vs Localization
i18n vs i10n

Translating of content & interface needs to be solved at a core level so everything that is output can inherently be one of many languages.

Since we have a start on i18n already, I think we should try and "complete" it so it's easy to do, while marking places that could be helpful to i10n as well (i.e. any changes to database schema).

i10n requires more than just language .. you need the en_CA type ISO locale which affects all the things Jax mentioned (dates, times, currency, etc). Fortunately, the formats for these are probably defined somewhere in an ISO doc, but I think there will be a lot more work invovled with making special types of data localizable than just finishing off i18n focusing on solid multi-language support.

How far?

Anonymous's picture

The question is how far should we go with internationalization?
As you said there's a lot more than just language, and I'm pretty sure everyone has a different approach to it...
As a european webdesigner I've worked (not as a developers, but in close collab with the developers) on lots of multilingual sites built on many systems for the past ten years, and most of them handled this problem poorly.
Some of these systems tried to address every need and were really bloated. Most used some kind of "duplicate document tree" strategy though, so it was just like maintaining two separate websites...

So, in Drupal apart from language what would we have to handle? Dates and time, currencies, addresses, files, etc... I think they fall into two categories: specific to a language, or specific to a geographical area. And to me language is a subset of the "areas". Let me explain...

What I imagined was a kind of i18n "profiles". What's this? A profile would be a collection of settings, to be used for an "area". I think it's important because even if two countries share the same language they may have different content or settings.

For example, you build a site for a Canadian company, which also has subsidiaries in France. You would have:

A profile for the area "Canada"
Languages: english (primary?) + french
Dates: mm/dd/yy
Currency: C$
...
A profile for the area "France"
Languages : french
dates: dd/mm/yy
Currency: €
...

When you enter the site you choose your area, and depending on your browser's settings a language may be selected.
Each area should have a default language, in case the browser has no preference than can be used.

Also a language could have a "fallback language", and this alone could enable you to easily share content between two areas with a common language.
Say, the fallback language for "France-Fr" is "Canada-Fr. 95% of the pages are identical, except a list of local subsidiaries and maybe the contact form. With this system when you write content for "Canada-Fr", it's also available for "France-Fr".
If you need a different page, Just create a "France-Fr" translation of the subsidiaries page, and voila, it will be shown only to users who chose "France" at the beginning.
All the other pages will fallback to the french-canadian pages.

I don't know if it's a good idea, I just wanted to share it ;)

Oops, forgot to log in...

elv's picture

About other CMSes, I designed a website made with Typo3 recently. It's a multilingual site (english, french, spanish), and as I had to use the admin interface a bit I saw how they handle i18n. On that particular site the developer chose to use a single page-tree with translations, and it works really well. But the interface is SO bloated!
A page can be composed of several "blocks". Sometimes you have to make changes to several blocks on a given page, which can be tedious because you have to clik-click-click a lot. Then you have to do the same changes for every other language... I guess it's the tradeoff for the blocks flexibility, compared to Drupal's edition on one screen.

i18n and themes

adixon's picture

in drupal-world theory, themes shouldn't be language dependent, but I think in most of my experiences, they are. Some of that is because I use the theme to make up for the shortcomings of Drupal's i18n support in the modules, but I suspect that it might always be true/necessary in some use-cases.

Conclusion - has anyone thought about how to tag a theme with a language? Example: I have two themes, one of which I want to use whenever a user is displaying a site with the english locale, and another for the french locale.

Or, alternatively, is there a nice way to take a theme and split off it's language dependent parts? I think this would be a better way, since a lot of the theme may be common. Ah, I'm remembering how civicspace has these 'subthemes', perhaps that's the best approach?

I think this connects to a previous posting that notices that some of the settings need to be multilingual, and already some of the settings are theme-dependent ...

good points

Gábor Hojtsy's picture

Good points. Some themes even not call t() on interface strings, so this is where we should start. I don't know of a good way to separate i18n related theme parts now, but template.php would be the obvious candidate for phptemplate themes.