[ic] Internationalization

Gert van der Spoel gert at 3edge.com
Fri Jul 31 18:43:15 UTC 2009


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Martin Sengstschmid
> Sent: Thursday, July 30, 2009 5:08 PM
> To: interchange-users at icdevgroup.org
> Subject: [ic] Internationalization
> 
> I want to create a shop, where you can choose between German (Default)
> and English.
> 
> I set in Administration - Internationalization
> DEFAULT_LOCALE    de_DE
> DEUTSCH   de_DE
> ENGLISH   en_US
> 
> Then I copied in the mysql-database the table products to
> products_de_DE
> and products_en_US, changed a little in the description in all three
> tables. (It did not work).
> 
> How can I manage, that if you decide German you get a German
> description
> and if you decide English, you get an English description?
> 
> Thanks Martin

I did not use products in my set up, because many of the product data (in my
case) was better kept untranslations.
However I have an additional table which I use to add extra product
information ... 

Setup:
Database tables:
* proddesc
  sku
  fielddata1
  fielddata2
  .....

* proddesc_i18n
  sku
  fielddata1_nl
  fielddata2_nl
  fielddata1_fr
  fielddata2_fr
  ....
    

In catalog.cfg:
DefaultLocale en_US      (but could be de_DE aswell of course)

Database proddesc MAP fielddata1 nl_NL proddesc_i18n::fielddata1_nl
Database proddesc MAP fielddata1 fallback 1
Database proddesc MAP fielddata2 nl_NL proddesc_i18n::fielddata2_nl
Database proddesc MAP fielddata2 fallback 1
Database proddesc MAP fielddata1 fr_FR proddesc_i18n::fielddata1_fr
Database proddesc MAP fielddata1 fallback 1
Database proddesc MAP fielddata2 fr_FR proddesc_i18n::fielddata2_fr
Database proddesc MAP fielddata2 fallback 1

The 'fallback 1' will put in the DefaultLocale content in case there is no
translation available in the current locale.

A tag such as: [data table=proddesc column=fielddata1 key="[item-code]"]
would show the translation if it existed for the locale you are currently in
... and else it would show the defaultlocale content.

I am not sure if there are other/better ways to do it.. This worked for me
at the time and I did not investigate further.

CU,

Gert











More information about the interchange-users mailing list