支持文件类型 (Strings)

.STRINGSDICT - iOS 本地化字符串字典用于复数翻译键(字符串)

文本由 Phrase Language AI 从英语机器翻译而得。

文件扩展名 

.stringsdict

API 扩展 

stringsdict

导入 

导出 

复数形式支持 

描述支持 

格式选项 

这些选项可以在文件上传和/或下载时指定。根据上传/下载方法(API、CLI、Repo 同步等),它们可以在查询参数 上传下载phrase.yml 配置文件中指定。

convert_placeholder

OS 本地化字符串字典是一种基于 XML 的交换文件格式,用于定义语言复数规则。当为具有不同复数形式的语言提供字符串的多个翻译时(例如,阿拉伯语),它会被使用。Stringsdict 文件的根元素是 <plist>,它包含一个或多个 <dict> 元素。每个 dict 元素表示一个在源代码中引用的键。

iOS Stringsdict 应仅用于为具有不同复数规则的语言提供备用翻译。否则,iOS 和 OS X 的标准本地化文件格式是 iOS 字符串资源文件格式。

格式选项

标识符 

convert_placeholder

类型 

布尔值

上传 

下载 

默认 

false

说明 

占位符将被转换为匹配特定格式的要求。示例:$s$@

代码示例

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
  <dict>
    <key>pluralized_key</key>
    <dict>
      <key>NSStringLocalizedFormatKey</key>
      <string>%#@localized_format_key@</string>
      <key>localized_format_key</key>
      <dict>
        <key>NSStringFormatSpecTypeKey</key>
        <string>NSStringPluralRuleType</string>
        <key>NSStringFormatValueTypeKey</key>
        <string>d</string>
        <key>一个</key>
        <string>只找到一个复数形式。</string>
        <key>其他</key>
        <string>哇,你有 %s 个复数形式!</string>
        <key>零</key>
        <string>你没有复数形式。</string>
      </dict>
    </dict>
  </dict>
</plist>
这篇文章有帮助吗?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.