How to localize numbers

More
7 years 11 months ago #1952 by gfaraj
Hi there,

I recently bought I2 Localization and I'm enjoying how easy it is to use. I have a question though. I need to localize some text through script, but in this case, the text is not a registered "term" - it's a number. The number is dynamic, so I need to be able to change that to the correct language without setting up a term for each possible number.

I thought doing myInt.ToString() would use the phone's culture to convert the number to a string, but it always converts it using the ASCII numerals 0,1,2,3,4.

Is there a way to do this using I2?

Thanks,
George

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

More
7 years 11 months ago #1955 by Frank
Replied by Frank on topic How to localize numbers
Hi,
Almost all languages allow using the normal 1,2,3,4,.. numbers. More so in the digital context and for games.
Even if you translate "I have 123 things." from English to Chinese using Google translator, you will see that the numbers part remains the same.

So, for most cases you are fine just adding the numbers directly.

If you want to change the numbers as part of a sentence (e.g. "You got 30 arrows") but you want the sentence part to be translated and just the numbers changed, you can use Parameters for that:
inter-illusion.com/assets/I2LocalizationManual/Parameters.html

Said that, if you really need to translate anything dynamically, I2 Localization supports Dynamic Translations:
inter-illusion.com/assets/I2Localization...ameTranslations.html

That could be useful for translating chat messages and some data coming from your servers. Notice that for this, the plugin has to contact Google and wait for the translator response, so you have to implement a Force or Async method as in the example code.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: gfaraj

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

More
7 years 11 months ago #1958 by gfaraj
Replied by gfaraj on topic How to localize numbers
That's interesting, thanks for the response.

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

More
4 years 10 months ago #4044 by impbox
Replied by impbox on topic How to localize numbers
Hi, was there ever a solution for this for localising numbers, eg. for Japanese we can use ascii numerals, but they are not the full-width forms so they don't fit to the CJK grid and the spacing looks bad.

We can manually enter the numerals for fixed strings in the spreadsheet, but is there a solution for dynamic numbers?

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

Time to create page: 0.136 seconds
Template by JoomlaShine