amaechler
amaechler

Reputation: 935

Localizing array and other special values in the Settings bundle

I'm looking for a way to localize different strings of the Settings.bundle in iOS. While localizing regular strings is straight-forward, I wonder if and how you would localize:

  1. Arrays. Consider the following plist entry:

    <dict>
      <key>DefaultValue</key>
      <string>Schedules</string>
      <key>Key</key>
      <string>defaultView</string>
      <key>Title</key>
      <string>Default View</string>
      <key>Titles</key>
      <array>
        <string>Schedules</string>
        <string>Tasks</string>
        <string>Patients</string>
        <string>Links</string>
      </array>
      <key>Type</key>
      <string>PSMultiValueSpecifier</string>
      <key>Values</key>
      <array>
        <string>Schedules</string>
        <string>Tasks</string>
        <string>Patients</string>
        <string>Links</string>
      </array>
    </dict>
    

    To localize the title, I add

    "Default View" = "Translated Default View";
    

    to the Root.strings file. But how can I get the Titles of the PSMultiValueSpecifier translated?

  2. FooterText. Is it possible to translate the FooterText of the following entry?

    <dict>
      <key>Title</key>
      <string>Server Settings</string>
      <key>Type</key>
      <string>PSGroupSpecifier</string>
      <key>FooterText</key>
      <string>Can this text be translated?</string>
    </dict>
    

Upvotes: 2

Views: 1337

Answers (1)

Gereon
Gereon

Reputation: 17882

In my app, I have simply added the Titles strings/translations to Root.strings:

"Schedules" = "Translated Schedules";
"Patients" = "Translated Patients";

and so on, works as expected.

Upvotes: 2

Related Questions