[ic] Urgent Locale questions
N.E.S.T. Solutions
nest_consulting at yahoo.ca
Sat Jan 23 06:43:15 UTC 2010
-----Original Message-----
From: interchange-users-bounces at icdevgroup.org
[mailto:interchange-users-bounces at icdevgroup.org] On Behalf Of Gert van der
Spoel
Sent: Friday, January 22, 2010 9:14 AM
To: interchange-users at icdevgroup.org
Subject: Re: [ic] Urgent Locale questions
> -----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
products_xx_YY.txt
(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
Hi Gert, Thank you for your help.
I've done all products_xx_YY.txt the same as products.txt for each language
now, and also I did the following in dbconf/locale/default.cfg for each
fields. These are for images, so I want to have the field fallback to the
products.txt table, seems that it doesn't fallback in any case
Database products MAP image0 __CURLOCALE__ products___CURLOCALE__::image0
Database products MAP image0 fallback 1
But it doesn't work. I tried this also, with and without the above lines:
Database products MAP_OPTIONS share __CURLOCALE__ products___CURLOCALE__
area area___CURLOCALE__ cat cat___CURLOCALE__ image0 image0___CURLOCALE__
That didn't work either. I even tried to map directly to products::image0
with this:
Database products MAP image0 __CURLOCALE__ products::image0
...or this...
Database products MAP image0 products::image0
...or this...
Database products__CURLOCALE__ MAP image0 products::image0
...or this...
Database products__CURLOCALE__ MAP __CURLOCALE__ image0 products::image0
All those combinations do absolutely nothing, not even a log entry in the
error log.
Throughout these attempts, I updated my DB field in the database in between
the various tests, and the image popped up on the web page... so, it's
definitely looking up in the products_xx_YY database table.
I tend to think that the line "Database products MAP image0 fallback 1"
means to make it fallback to products.txt, but it just doesn't and I can't
find documentation for it.
Any thoughts?
Thanks a million
Martin
More information about the interchange-users
mailing list