Translate attributes

Project:Ubercart Contributions
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

Hi,

I'm testing the wild ubercart 1.0 for a shop that have multilanguage purpose. I'm glad of all improvements done since the third beta, that was the latest I tested.

However I have a question, maybe stupid, but the Attributes don't seems to be translatable, I can't find them in the locale module, is there a way to do it ?

I saw this post on the official drupal website, I'm in the same case and, unfortunately, there are no answers ^^

Version: 
Ubercart 1.0
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Translate attributes

This is really just a limitation of i18n in Drupal 5 (not sure about D6). User defined strings like that aren't easily translatable, if at all. I know others have made it work in the past, so there might be something in the forums about it, but I really wouldn't know where to point you. Sad

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Re: Translate attributes
Assigned to:Ryan» zmove

Hmmm, and what about the idea to display the attribute in a t() function.

It should be available for translation in the locale module, even if it's a variable that you get in the database isn't it ?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Translate attributes
Assigned to:zmove» Ryan

Well, that technically would work, but it really is just a hack. The function is only supposed to be used with string literals, and we're trying to stick to the coding standard on issues like this.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Hmm I see, I will try to
Assigned to:Ryan» zmove

Hmm I see,

I will try to search for a viable solution, there is a way to create different attributes for different translations, but I really don't like this way to proceed. You will lost possible synchronization between translated nodes when you edit stock etc.... and it can be easily become impossible to manage if you have a shop in 8 different languages.

I will try to look further with that issue, there is certainly a drupal friendly way (at least provided by i18n or drupal 6) to do that.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Hi, And it is the same deal

Hi,

And it is the same deal with the header of tapir tables column or is there a way to translate them ?

It not, I think this needs a solution with D6 (don't know if it's a part of internationalization battlepan) but there are a lots of little things like that that are hell for multilingual website.

marcoBauli@drupal.org's picture
Offline
Joined: 12/17/2009
Juice: 12
still not working
Assigned to:zmove» marcoBauli@drupal.org

howdy, this is almost a full stop to the attributes_module on multilingual stores... anyone any solution? I've been looking anywhere but attributes / options translations do not work yet... : (

help really appreciated, thx!

PS: Ubercart 2.0, Drupal 6.x

donquixote's picture
Offline
Joined: 09/09/2009
Juice: 35
#7
Category:» feature request
Assigned to:marcoBauli@drupal.org» Guest

Hey Ryan!
Could you have a look if the following would be a good solution for ubercart i18n?
Keyword-based translation system
This is not meant as a finished solution, but rather as a starting point. Imo the existing Drupal i18n features suck for user-defined strings. So, maybe you can give some feedback and help push this forward.

It would allow to translate attributes, options, payment options, and all the user-defined strings.

merdekiti's picture
Offline
Joined: 07/22/2010
Juice: 3
#8

File "uc_store.module"

string "$pattern = variable_get('uc_weight_format_'. $unit, $defaults[$unit]);"

change to

"$pattern = t(variable_get('uc_weight_format_'. $unit, $defaults[$unit]));"

Eye-wink))

and translate attributes

artatum's picture
Offline
Joined: 02/10/2010
Juice: 147
#9

Hi
It seems great.
But after that where and how do you translate attributes and options ?
I cant find my options labels while searching in 'translate interface'... No match.
Is there a .po we need to edit or smth like this?
This problem is very annoying : chinese customers wont understand options and I'll become poor...
I cant believe there is no way to translate attributes and options in such a great tool.
It must be very simple, I think.
Please Mr Uber

Artatum - www.webographe.fr

artatum's picture
Offline
Joined: 02/10/2010
Juice: 147
#10

Could you please merdekiti let us know how and where, after doing this mod in uc_store.module you'll, then, 'translate attributes'.
Please Smiling

Artatum - www.webographe.fr