views:

18

answers:

1

Hi.. i have an application where it displays a list of items in ListView. These items(strings) are coming from the server which are stored in english language. I want to display these English characters in Chinese language in my application. Is it default if the user selects Chinese lang for their device or should i have to do something else.. I know how to localize images, strings that are stored in resources, but i want to localize the strings coming from internet that are stored in a single language in database.

Please help me.. Thank you..

EDIT: If the administrator enters the data to the database in chinese language, will it be displayed in chinese in my ListView?

A: 

If the administrator enters the data to the database in chinese language, will it be displayed in chinese in my ListView?

I hate to do that, but I have to. Yes. No. Maybe. It will be, provided that:

  1. Your database supports Chinese characters (i.e. supports GB18030 encoding).
  2. The data is transmitted in appropriate way (you won't lose any information).
  3. Your application (and the platform) supports these characters.

That said, since you already have English strings in the DB, you do not have to modify anything on the backend, provided this data is static. By static, I mean it is not changing constantly and you can accept releasing new client version when it changes. If this is the case, you can treat English strings as keys to your resources and gather appropriate strings at runtime.

Is it default if the user selects Chinese lang for their device

Yes, that is what you get by accessing default locales when user switches his/her language to Chinese. Mind that there are a few Chinese locales out there (because of Simplified Chinese and Traditional Chinese), I assumed that you are talking about Chinese Simplified (as in P.R.C.).

Paweł Dyda