【问题标题】:How to translate language packs in SocialEngine如何在 SocialEngine 中翻译语言包
【发布时间】:2018-12-23 16:27:05
【问题描述】:

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

【问题讨论】:

    标签: translation socialengine


    【解决方案1】:

    不用担心这些,你可以使用这个插件:Language Translator / Multilingual Plugin

    【讨论】:

    • 抱歉,我确实需要知道语言文件是如何工作的。
    【解决方案2】:

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

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

    “总积分:%s”

    这是分隔符:

    ;

    这是你的翻译:

    “总积分:%s”

    干杯;)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-20
      • 1970-01-01
      • 2020-04-23
      • 2015-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-26
      相关资源
      最近更新 更多