0

I'm currently working on a project that the client wants to deliver to different countries.

The application is a website.

We started out using resource files to change the text the user sees when visiting pages based on their locations. But this isn't enough.

In the English version of the site we have a page that states "page x of y". In the Chinese version of the site, it's not enough to do " x y"

The syntax for the language doesn't match the placeholders that were created for the English language.

The only other option I can think of is to have a completely separate site, serving different content.

Are there any other options to solve this issue?

  • 2
    What programming language is the website using? – user40980 May 21 '14 at 16:26
  • we're using C# & MVC – Jamez May 22 '14 at 11:23
  • 1
    Instead of forcing a language version on a user from a specific country, you should instead use the "flag as language" option and let the user decide. – Joe May 23 '14 at 23:08
  • 1
    Yes! It was very annoying going to Tokyo and having a bunch of apps suddenly decide I could read Japanese. – Steven Burnap Dec 8 '14 at 4:07
1

For i18n, you've got several solutions of increasing complexity.

First, store a language specific template in a properties file. E.g. messages.en may store the property. This works for short and simple text.

pagination.text = [X] of [Y]

But messages.zh may store

pagination.text = [X of Y]

Second, at least in the Java world, changing a property file change means a new deployment. String attributes can also be internationalized in the database.

Suppose you had an Products mapped directly to a product table. Let's say we have the following API to support internationalizing the name of a product.

class Product
   def id: Long
   def name(language: Language): String

class Language
   // e.g. 'en' for English, 'zh' for Chinese
   def isocode: String

   def name: String

   // ordered list of isodcode s.t. if the internationalized attribute
   // does not exist for this language, it tries each language in this list in order.
   def fallbackLanguage: List[String] 

   // default language for entire system. Use this language if all else fails
   def isDefault: Boolean

The name attribute on product table would need a one-to-many table joined with the language table.

It usually helps to provide an admin interface so that business users can make changes to these core entities on their own.

Next, you may need to add currency, country and region (e.g. California, Wuhan Province), as first class object just as much as language, so that your system can localize to the particular business rules that apply to a specific region. To continue with my product example, the prices in China won't be the same as in the US, simply because the currency differs. Chinese customers may be expected to pay only in renminbi. And US customers pay only in US dollars.

Lastly, a reason that the same overarching functionality may need to be a separate system is that the business rules in different countries differ. Taxes in the US are not the same as taxes in China. The product catalog can differ because of differing marketing emphases. So It may make sense for your client's China team to have ownership over their own site, as opposed to your client's English-speaking team in an English-speaking country.

0

It depends on your programming tools, as some tools enable project culture that allow you to change design accordingly. If you are using ASP.NET you can have a look this information http://msdn.microsoft.com/en-us/library/ff647353.aspx

If you are using PHP/Phyton, you need to prepare all the words, then detect the language of the user. Finally, if there is a request, your application need to compose the page properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.