如何在SocialEngine中翻译语言包

时间:2018-07-16 07:17:49

标签: translation socialengine

我知道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>."

2 个答案:

答案 0 :(得分:0)

  

%s   -这是可变的,这意味着变量很少:   %1 $,%2 $ s   依此类推... X中的任何数字:   %X $

这是关键(在您的情况下):

  

“总积分:%s”

这是分界线:

  

;

这是您的翻译:

  

“总积分:%s”

干杯;)

答案 1 :(得分:-1)

不用担心任何一个,您可以使用此插件:Language Translator / Multilingual Plugin