我知道SocialEngine将语言文件作为CSV文件存储在application/languages
中。 CSV文件中的常见格式如下:
"Source word"; "Translated word"
但是,这有时会变得非常复杂,尤其是当某些部分使用特殊字符时,例如:
"Total Credits : %s";"Total Credits : %s"
"_EMAIL_SITEGROUP_BADGEREQUEST_APPROVED_EMAIL_TITLE";"Group Badge Request Approved"
"Video conversion failed. Please try uploading %1$sagain%2$s.";"Video conversion failed. Please try uploading %1$sagain%2$s."
"{item:$subject} replied to a comment on {item:$owner}\'\'s page offer {item:$object:$title}: {body:$body}";"{item:$subject} replied to a comment on {item:$owner}\'\'s page offer {item:$object:$title}: {body:$body}"
"3%s Level Category:";"3%s Level Category:"
"I have read and agree to the <a href='javascript:void(0);' onclick=window.open('%s','mywindow','width=500,height=500')>terms of service</a>.";"I have read and agree to the <a href='javascript:void(0);' onclick=window.open('%s','mywindow','width=500,height=500')>terms of service</a>."
答案 0 :(得分:0)
%s -这是可变的,这意味着变量很少: %1 $,%2 $ s 依此类推... X中的任何数字: %X $
这是关键(在您的情况下):
“总积分:%s”
这是分界线:
;
这是您的翻译:
“总积分:%s”
干杯;)
答案 1 :(得分:-1)
不用担心任何一个,您可以使用此插件:Language Translator / Multilingual Plugin