由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Multilanguage Support?
相关主题
I like this one.Go lang有多少公司 组 在用到底
[合集] C/C++ calling function by nameWhich language has the brightest future in replacement of C between D, Go and Rust? And Why?
Need help on choosing the languagePattern matching
怎么把string变为一个variable的名字 ?[合集] c++的题
有人用clj刷lc么数据类型判断
Default function template argumentsjava string stream
ajax小问题计算围棋棋盘合法图案的源代码
question about using Hive parameter (转载)QuickBasic grammer question
相关话题的讨论汇总
话题: support话题: strings话题: chinese话题: problem
进入Programming版参与讨论
1 (共1页)
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

1 (共1页)
进入Programming版参与讨论
相关主题
QuickBasic grammer question有人用clj刷lc么
How to concatenate two .tar.gz filesDefault function template arguments
两个C的#define问题ajax小问题
问两道微软的email笔试题目question about using Hive parameter (转载)
I like this one.Go lang有多少公司 组 在用到底
[合集] C/C++ calling function by nameWhich language has the brightest future in replacement of C between D, Go and Rust? And Why?
Need help on choosing the languagePattern matching
怎么把string变为一个variable的名字 ?[合集] c++的题
相关话题的讨论汇总
话题: support话题: strings话题: chinese话题: problem