【问题标题】:Write # in yaml (in the string)在 yaml 中写入 #(在字符串中)
【发布时间】:2012-11-22 13:59:32
【问题描述】:

我是使用 yml 文件的新手(用于我的框架中的翻译)。

我正在尝试在翻译中添加一个“#”(将成为 Twitter 分享...blabla)。

这可能吗,因为文件像注释一样翻译它...

【问题讨论】:

    标签: syntax internationalization tags comments yaml


    【解决方案1】:

    只需将值放在单引号或双引号内,它就不会被视为注释。比如:

    en:
      twitter:
        share: "#hashtag"
    

    【讨论】:

    • 谢谢。这正是我所需要的。
    猜你喜欢
    • 1970-01-01
    • 2010-10-17
    • 1970-01-01
    • 2020-04-30
    • 1970-01-01
    • 2021-02-08
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多