[ic] Urgent Locale questions

Gert van der Spoel gert at 3edge.com
Fri Jan 22 14:14:06 UTC 2010

> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of N.E.S.T. Solutions
> Sent: Friday, January 22, 2010 8:24 AM
> To: interchange-users at icdevgroup.org
> Subject: [ic] Urgent Locale questions
> Hi all,
> I'm trying to setup a multiple language site, and I've got no hair
> left!
> I'm running ic 5.6 with the default
> <catroot>/dbconf/locales/default.cfg,
> along
> with the xx_YY.cfg file for each language, which includes :
> Variable CURLOCALE xx_YY
> include dbconf/locales/default.cfg
> I have configured my locale table with this to test with xx_YY only for
> now:
> ProductFiles    products                products_xx_YY
> products                de_products     products_xx_YY
> variable.txt has this:
> DEFAULT_LOCALE  en_US   Internationalization
> LOCALES xx_YY yy_ZZ aa_BB       Internationalization
> I've created the ./products/products_xx_YY.txt and the
> ./dbconf/mysql/products_xx_YY.mysql
> With the fields I see that are MAPped in default.cfg, on reconfig, my
> table
> loaded ok with one item to test.
> On the front-end, I view the product from the products_xx_YY language
> (title, desc, comment) but all
> Other fields that are present in products.txt and that are not in
> products_xx_YY.txt don't show. I thought
> that they would fallback to products.txt if absent or empty.
> I'll also have to do the categories, prod_group, AND (variants?!?).
> I'm now very puzzled with the following 4 questions:
> -- When using a non default locale, does IC fetch ALL fields from
> products.txt and then
> replace the ones that are mapped only, in the default.cfg? Or do I need
> 100%
> of the
> columns in my locale products_xx_YY files?

Have not tried this, but does the following line not provide the columns
that you want to have MAPed with the non-translated content:
Database products MAP_OPTIONS share __CURLOCALE__ products___CURLOCALE__
area area___CURLOCALE__ cat cat___CURLOCALE__

So the area and cat would be used from products.txt  and not part of
(now area and cat do not exist in the standard products table so the above
line probably does jack).

> -- For cat and prod_group, do I have to create cat_xx_YY and
> prod_group_xx_YY also the
> same as I did for the products?

If you have something to translate then yes you should follow the same
scheme ... for all columns that do not need localization I thing you can go
with MAP_OPTIONS share  again ..
> -- I see the options mapped in default.cfg, do I have to map the
> variants
> also to
> be able to localize variants?

Either that or you could attempt to use [msg]  or [L]  tags  and the locale
table to translate specific words/phrases ... 
You might actually want to go for the translation tag as in your order
management system you would probably want to keep your options
non-translated .. so when someone orders a Red t-shirt, it will not become
Rot when the order is made with the german locale.

> -- All together, once everything will be working, does the MAP in the
> default.cfg instruct
> IC to populate all locale files (products_xx_YY.txt, options_xx_YY.txt,
> variants_xx_YY.txt ?   )
> when creating a new product? Or do these files have to be done
> manually/otherwise?

When you create a new product and add only the standard stuff in the admin
then I do not think it will populate any of the xx_YY tables and also think
it should not as you might not want to have English text in locale tables ..

What I for example have in my admin is additional tabs with the locale .. so
my first tab has the content of products and I have a tab 'Greek' and a tab
'Dutch' and clicking those tabs I get the fields for the xx_YY.txt table and
enter my data there aswell ...

> I propose to write the full manual on this once I get it straight,
> seems to
> be lacking a
> good How-To on this subject.
> Thanks in advance for your help, I'm desperate to figure this out
> Martin

More information about the interchange-users mailing list