Register in English

  • Posts: 5
  • Thank you received: 0
12 years 3 months ago #61646

I accept that I am a noob with Hikashop, so I am sorry if there is an obvious solution. I have looked but I cannot find one. My site does not require a login until a user tries to buy something. When they try to buy something Hikashop asks them to register, fine. If they choose a country like Thailand (where I am providing a service to tourists) the choice of province changes to Thai language... something that the average tourist cannot read... big problem. They cannot register because they cannot read the Thai language. Is it possible to get the province options in English? It does look stupid on an English language site to have foreign language reading requirements. I travel a lot and work in many countries and this is a constant problem with many web sites. I would understand if the language was obtained from the browsers but I do not want IP specific languages on any site as it frequently makes the site unusable.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
12 years 3 months ago #61658

Well, it's logical to do that in most cases.
When someone says that his address is in Thailand, it's almost certain that the person knows how to read the province where he is living.

As a practical reason, we didn't find any freely available and easily usable database of world provinces in English to integrate in HikaShop.
But if we were to go even further, we would have to provide the translation of each country and province name for each language. That would be too much data to include in HikaShop.

In any case, you can go in the menu System->Zones and change the name of all the zones yourself. If you provide us an export of the zones table for the provinces of a country, we'll be happy to include them in.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
12 years 3 months ago #61668

Thank you for your prompt answer. Your answer makes me feel that you do not travel much because this is not the only country with a large expat community or tourist industry and many countries have populations that speak different languages within the same country. In my travels I meet a lot of people that get seriously pissed off about this and that is why I would not have it on one of my sites.

With your Azerbaijan choice (I am impressed that the regions are in Azerbaijani) almost half the population are still Russian speaking and cannot read or write Azerbaijani. Kazahstan is the same (in Kazakhstan just over half Russian speaking) but you have Almaty City in English??? and the rest in Kazakh. I could go on, I have lived in these countries. I do understand what you say and I hope you understand what I am saying. It is better if the language is taken from the browser setting but that would require several option for several countries. I understand that...

I assume that you are not able to offer a simple solution and I cannot read the provinces on your list, so I cannot do anything with them. I will use one of the other options which is a shame as other than this, I like your product. With other options they allow the user to type their own province.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
12 years 3 months ago #61672

Hi,

My travels don't have anything to do with that thanks. I traveled a lot and speak Japanese and English fluently even though neither of them are my mother tongue. So I'm perfectly aware of the issue.

That's not the point. The point is that the database of provinces that we have is like that. I would love to provide all the translations of all the countries/provinces but we don't have the data, so it's not possible.
Also, the browser does not offer any information on the country of the user besides the IP address which doesn't always match the country where the user want to ship his goods to. So you can't do anything in that respect.
You say that most solutions out there have the same issue. That's normal. Only really big companies have enough resources to localize everything in their solutions. And even for them it takes some time.

You say that you want your users to enter the province themselves. That's not a problem. Just go in the menu Display->Custom fields, and change the address_state field from the type "zone" to the type "text" and your users will be able to enter the province themselves in their own language.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
12 years 3 months ago #61692

Thank you for providing a simple solution for me, I do appreciate that.

With regard to browsers, the following code will tell you what language the user prefers to use according to their browser preferences -

#########################################################
# Copyright © 2008 Darrin Yeager #
# www.dyeager.org/ #
# Licensed under BSD license. #
# www.dyeager.org/downloads/license-bsd.php #
#########################################################

function getDefaultLanguage() {
if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
return parseDefaultLanguage($_SERVER["HTTP_ACCEPT_LANGUAGE"]);
else
return parseDefaultLanguage(NULL);
}

function parseDefaultLanguage($http_accept, $deflang = "en") {
if(isset($http_accept) && strlen($http_accept) > 1) {
# Split possible languages into array
$x = explode(",",$http_accept);
foreach ($x as $val) {
#check for q-value and create associative array. No q-value means 1 by rule
if(preg_match("/(.*);q=([0-1]{0,1}\.\d{0,4})/i",$val,$matches))
$lang[$matches[1]] = (float)$matches[2];
else
$lang[$val] = 1.0;
}

#return default language (highest q-value)
$qval = 0.0;
foreach ($lang as $key => $value) {
if ($value > $qval) {
$qval = (float)$value;
$deflang = $key;
}
}
}
return strtolower($deflang);
}

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
12 years 3 months ago #61693

That code is already in Joomla.
The whole language of the website can already change automatically based on the language of the browser.
That doesn't tell the country of the user and doesn't give the name of his province in his language. Again, we don't have the data on our end.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum