gpt4 book ai didi

localization - l10n '.arb'文件格式

转载 作者:行者123 更新时间:2023-12-01 23:28:43 26 4
gpt4 key购买 nike

我遇到的一个项目具有本地化的关注结构

每种语言都有一个目录,在该目录下将有一个与目录+扩展名“.arb”同名的文件。

en/en.arb

我找不到说明该文件格式的文档。
.arb文件中的样本内容
"FOO_123": "Your pending cost is {COST}",
"@FOO_123": {
"source_text": "Your pending cost is {COST}",
"placeholders": {
"COST": {
"example": "$123.45",
"description": "cost presented with currency symbol"
}
}

我能找到的最接近的是 this
  • 是用于了解'.arb'文件的权威文档吗?
  • 其值具有带有href的 anchor 标记的资源是什么样的?这是正确的方法吗?

  • "FOO_124": "Refer to this {LINK}",
    "@FOO_124": {
    "source_text": "Refer to this {LINK}",
    "placeholders": {
    "LINK": {
    "example": "<a href="https://en.wikipedia.org/">Encyclopedia</a>",
    "description": "Link to the Encyclopedia page"
    }
    }

    最佳答案

    ARB是Google的本地化格式,在the webflutter framework中使用

    来自ARB (Application Resource Bundle Specification)

    Application Resource Bundle (abbr. ARB) is a localization resource format that is simple (based on JSON), extensible (vocabulary can be added without affecting existing tools and usage), and directly usable (applications can access the resource directly from this format without converting to another form).

    In ARB, localizable resources are encoded as a JSON object. Each resource will have a resource entry identified by resource key, and an optional resource attribute entry with resource attribute key.



    这个答案是对我的搜索的总结,希望可以节省别人的时间。

    关于localization - l10n '.arb'文件格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43082804/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com