i18n support...

Posts: 129
Joined: 08/14/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer

Hi everyone.

I'm currently setting up a multilingual site again with the i18n module. are there any plans to make ubercart more compatible with i18n / several languages? Most of ubercarts strings (but far from everyone, as discussed before) are now translatable through the t() function.

However, there are a lot of code that breaks the use of the t() function.

An example of this is when constructing the customer e-mail notifications. This code is used to set the subject:

$subject = variable_get('uc_notify_cust_checkout_subject', t('Your Order at [store-name]'));

So what that means is that as long as I never submited the notification settings form (and therefore never put a value for uc_notify_cust_checkout_subject in the database) i'll be fine. However, as soon as I get a actual value for that variable i'm screwed when it comes to translating it.

There are a lot of these around in the code (among other things) that should be fixed in the Beta. Right now it's not really possible to make a good multilingual store with übercart without hacking the core until you never want to upgrade again Sticking out tongue

Your sincerely,
Thomas Kulvik
Ny Media AS

Posts: 4255
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I'm curious what you make of Gabor's comment given your post:

http://drupal.org/node/191810#comment-628930

Posts: 15
Joined: 12/02/2007

The translation of 'user defined content' really sucks in drupal.

I am *working* on a module which may solve this problem. But it will require rewrite of all 'user defined content' usage in code. Will report back if it is ready for testing.

Posts: 15
Joined: 12/02/2007

I am trying to use ubercart with i18n.
I can't figure out how could I set up the catalog correctly. The specific use of taxonomy term inside URL path is not supported by i18n.

a) I correctly connected term/1 with term/2. I can switch between /hu/taxonomy/term/1 and /sk/taxonomy/term/2 with "Translations" block (used in i18n to switch between languages).
But it is impossible to switch between hu/catalog/1 and sk/catalog/2 which would be the correct functionality.

b) The subcatalog url contains the taxonomy term name also, but the term name may have special characters, so it is unusable as part of the url. It is not good to remove these special characters, the foreign word make no sense this way. It would be good if the special characters were converted to corresponding (equivalent) English letter.

c) There is also a problem with catalog name, as it is a name of one vocabulary, and as I see it is not translatable in i18n. Maybe I could try to translate it with l10n_client, which is not a wise solution, but it should work.

So it does not seems good from multilingual prospective, and I just only started experimenting with it.

Posts: 129
Joined: 08/14/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer

Hi pasqualle.

You've just entered some frustrating ground Eye-wink

a) I never got that to work. Instead i'm now using //taxonomy/term/ in my own vocabulary for all my products (which works just fine).

b) That won't be a problem if you just use regular taxonomy? That's catalog related?

c) Same as b.

This is exactly what i've been writing about the last year on the forums, but the überpeople are aware of this (but I don't know if they're actually spending any time on it.. yet).

You can see a "working" multilingual site here: http://butikk.tapirforlag.no. The reason why I call it "working" is because to achieve that we had to hack every second module in ubercart and the i18n module itself Eye-wink

It would surely be nice to improve some of the multilingual stuff in ubercart, especially now when rak have set up a i10n translation server for the community and a lot of people are actually translating ubercart and using it with other languages. Multilingual is one thing, but there's a lot of problems with just using it with one language as well, as long as it's now english Eye-wink

Best regards,
Thomas Kulvik

Ny Media AS
www.nymedia.no
+47 4000 7955

Posts: 15
Joined: 12/02/2007

Hi kulvik, thanks for the quick reply.

Yes, I checked your site before and noticed that you changed the way how the catalog is displayed. Maybe you do not use the module at all..

I really hate doing hacks in drupal. Can you create a quick diff of your hacked modules? If it is not a secret. And we can start solving these issues by making patches or creating additional modules, and helping out the development.

Posts: 4255
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Just to give a quick +1 to the things kulvik says. I think he's had the most success doing multilingual w/ Ubercart, but he's also got the coders on hand to adjust the modules to make it work. A goal for the next version of Ubercart is to remove all the form customizable strings (like button titles, field titles, etc.). This is the main thing breaking multilingual support. We put them in there to make the cart easily modifiable in those places, but we weren't familiar with all the issues related to multilingual Drupal sites at the time.

In the future, after this change happens, we'll refer folks to the translation modules when they want to rename various parts of Ubercart.

Posts: 15
Joined: 12/02/2007

Please consider using this module, for the next major ubercart release.
http://drupal.org/project/codes

questions and suggestions are welcome

Posts: 4255
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Exciting possibility... although I'm curious what the line "The module does not do anything for now (only display content of 2 tables)." in the project description means. Smiling

Is this basically intended to be a web based interface to accomplish what moxide is investigating here?

Posts: 15
Joined: 12/02/2007

ok, point taken Smiling I will try to speed up the development.
But I am quite sure it will be released before ubercart 6.x Laughing out loud

Yes, it is something same, in the meaning of translating variables (user defined strings). But it actually does not depend on i18n module, nor locale. I maybe posted this in a wrong forum topic.
I am not sure how other developers will accept different translation functionality. The translation should be similar to the Strings module in i18n, but i did not really tested that module.

Posts: 4255
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Well, we'll definitely keep an eye on it when we start porting to Drupal 6.x! Multilingual custom strings would be incredible, and I do wish you all the best with development. Let us know when it comes time to test it out, and we'll work up some Ubercart integration. Cool