Probably the best way is to do l10n in the server side also as Justin
suggest. But if you can't, you may try another approach if messages from
server are limited and has no variable parameters, using a HashMap<String,
Integer> so each server string message is mapped to a resource id.

But note this solution is not valid if the server sends strings with
variable parameters such as "you have run 11 miles" where them number of
miles may vary.

You can still handle these cases using regular expresions but it gets more
complicated, so if you have control over the server the real solution is,
as told, implement l10n also on it.
El 11/07/2012 12:45, "Reddy" <[email protected]> escribió:

> Hi All,
>
> I am creating an application which supports multiple languages. Everything
> is fine for static string data. But how can i handle the messages coming
> from server to display in corresponding language.
>
> Regards,
> Murali
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to