Setting Languge of Ubercart dynamically

Posts: 20
Joined: 08/12/2008

Many thanks to those that helped me with my previous posts. I've got another question, that may more directly involve drupal rather than ubercart, but I figure it won't hurt to ask.

I'm building a shopping cart that will essentially handle checkout in various languages. So when a user comes to us from our Korean shopping page, the text will be in Korean, from US the text will be in English, etc... My question is not related to translations as much as it is with how do I tell Drupal which language to display? My "landing page" will receive the site they came from (or which language to use in the checkout), and using that variable I need to set the language.

Any ideas on how this is done?

Again, thanks for all your help, you guys rock!

Greg

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

I've seen one of the modules, either localization or i18n, or one of their submodules, let you have a language switcher on your site. This works by adding the language code to the beginning of the Drupal path. So Korean users should be sent to http://www.example.com/ko/cart/checkout and American users to http://www.example.com/en/cart/checkout.

I don't remember anyone who's actually used this module with Ubercart, so there's no telling how well it'll work. If it does, I'm sure lots of folks here would love to hear how you did it.

Posts: 20
Joined: 08/12/2008

Thanks for the heads up Lyle. It's mucha appreciated. I'll look into this. I'll post back here when/if I get a good workable solution.

thanks!

Greg

Posts: 84
Joined: 02/14/2008
Bug FinderGetting busy with the Ubercode.Internationalizationizer

What Lyle describes is i18n and although I have no overview anymore about the development done at localizer I guess in the long term i18n is better for you as it is the one which in D6 went partly into core (=> update).

You should be able to translate most stuff with it, if some variables would refuse to translate, read this, specially #26. Attributes might be the exception, I just remember there was a thread about.

In case you need multiple currencies, there is a promise by TR.

Search for i18n, also old threads contain very useful informations. Good luck Smiling

Posts: 20
Joined: 08/12/2008

Thanks Al. I appreciate your input. I'm going to look into this right now.

thanks!

Greg

Posts: 924
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I just uploaded two modules thanks to Al's prodding. Smiling Both are useful for internationalization.

One uses the visitor's IP address to determine the country that visitor resides in. (Yes, I know, this isn't foolproof, but it was a client's requirement.) This country determination can be used to present location-specific information of any type to your visitor. Debugging options let the administrator masquerade as a visitor from another country in order to test the site.
http://www.ubercart.org/contrib/6103

The second allows you to display prices in a locale-specific currency. Currency conversions factors can be hardwired in or looked up dynamically and cached for an admin-specified interval. There are lots and lots of configuration and debugging options in this module.
http://www.ubercart.org/contrib/6102

--

<tr>.