t*****e 发帖数: 67 | 1 I'm using VB.Net to writing an application that needs to support multiple
languages, such as both English and Chinese.
The problem for me is that the grammer issues, and I am wondering if someone
here has a similar experince and can give me some ideas about solving this
problem.
The problem is that in my code I have some lots of strings that are
concatenated from smaller string, such as:
string x = "There are " + aNumber + " days left in your subscription".
so I have a Chinese translated strings | g*****g 发帖数: 34805 | 2 You are supposed to use an external message source with parameter,
something like
En file:
message1 = There are {0} days left
Cn file:
message1 = 还有{0}天
then translator can keep the parameter and do their job. In runtime
you read the entry and replace the parameter.
At least this is the standard way in Java world. We support 12
languages in our product.
someone
this
your
【在 t*****e 的大作中提到】 : I'm using VB.Net to writing an application that needs to support multiple : languages, such as both English and Chinese. : The problem for me is that the grammer issues, and I am wondering if someone : here has a similar experince and can give me some ideas about solving this : problem. : The problem is that in my code I have some lots of strings that are : concatenated from smaller string, such as: : string x = "There are " + aNumber + " days left in your subscription". : so I have a Chinese translated strings
| t*****e 发帖数: 67 | 3 Thank you! That makes sense. I guess I have to changes my code to use
parameterized strings rather than concatenated strings.
【在 g*****g 的大作中提到】 : You are supposed to use an external message source with parameter, : something like : En file: : message1 = There are {0} days left : Cn file: : message1 = 还有{0}天 : then translator can keep the parameter and do their job. In runtime : you read the entry and replace the parameter. : At least this is the standard way in Java world. We support 12 : languages in our product.
| c**t 发帖数: 2744 | 4 create resource file for each lauguage...
someone
this
your
【在 t*****e 的大作中提到】 : I'm using VB.Net to writing an application that needs to support multiple : languages, such as both English and Chinese. : The problem for me is that the grammer issues, and I am wondering if someone : here has a similar experince and can give me some ideas about solving this : problem. : The problem is that in my code I have some lots of strings that are : concatenated from smaller string, such as: : string x = "There are " + aNumber + " days left in your subscription". : so I have a Chinese translated strings
|
|