How to Design multilingual e-commerce websites in multiple countries

Source: Internet
Author: User
Tags subdomain name
Now, if the company wants to build a website that supports multiple languages in multiple countries, we should design it in this way, either under a domain name, in the form of cn or fr, or through a domain name. fr ,. en ,. cn is better. now the company wants to design a website that supports multiple languages in multiple countries. it is under a domain name through/cn, /fr in this form, or through the domain name. fr ,. en ,. cn is better

Reply content:

Now, if the company wants to build a website that supports multiple languages in multiple countries, we should design it in the form of/cn and/fr under one domain name, or through the domain name. fr ,. en ,. cn is better

We recommend that you use a subdomain name instead of a directory.
For example, your main site is
Www.example.com
Below are the sub-sites

Zh.example.com // China us.example.com // US jp.example.com // Japan...

I personally think how comfortable it is. Amazon doesn't have a domain name.
However, if you want the sub-stations in different countries to synchronize the login status, you need to consider cross-domain cookie issues.

Assume that a domain name is used to provide services for multiple countries around the world. In this case, in addition to solving language problems, it is more important to solve time zone problems. by default, our platform development is in the GMT + (Beijing time. in this case, you need to select your country (language determined) and time zone (some countries have multiple time zones, such as the United States ).

If date. timezone is not configured in php. ini, the default Time is Coordinated Universal Time (Universal Time Coordinated ).

Ini_set ('date. timezone ', 'utc'); // UTC time echo date ('Y-m-d H: I: S', time ()). "\ n"; // output 2015-12-11 02: 43: 28ini_set ('date. timezone ', 'prc'); // Beijing time (UTC + 8) echo date ('Y-m-d H: I: S', time ());. "\ n" // output 10:43:28

Develop a website for multiple time zones. the database stores the UTC time, and the output time is based on a specific time zone.
JS obtains the client time, calculates the time difference between the client and the server, and then calculates the activity time of the visitor's time zone.
Unlike China's central Beijing time, the United States has four time zones in use, which is messy.

As for multiple languages, it is quite easy to solve. just use an array. take the logon interface as an example:

The require language File: require APP_ROOT. '/lang /'. $ app ['Lang ']. '/'. $ template; require APP_ROOT. '/themes /'. $ app ['theme ']. '/'. $ template; lang/zh_CN/login. php
  'Login', 'username' => 'account', 'password' => 'password', 'Remember me' => 'Remember me ',); lang/en_US/login. php
  'Login', 'username' => 'username', 'password' => 'password', 'Remember me' => 'Remember Me ',);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.