All the features of XCode Strings Catalogs are supported, including simple values, variants, substitutions and plurals.

No extra configuration is necessary as all the features are supported out of the box.

Example #️⃣

{
  "sourceLanguage" : "en",
  "strings" : {
    "simple_key" : {
      "comment" : "This is a comment for translators.",
      "extractionState" : "manual",
      "localizations" : {
        "en" : {
          "stringUnit" : {
            "state" : "translated",
            "value" : "Default Value"
          }
        }
      }
    },
    "device_variant" : {
      "extractionState" : "manual",
      "comment": "More complex example with device variants.",
      "localizations" : {
        "en" : {
          "variations" : {
            "device" : {
              "ipad" : {
                "stringUnit" : {
                  "state" : "translated",
                  "value" : "ipad"
                }
              },
              "mac" : {
                "stringUnit" : {
                  "state" : "translated",
                  "value" : "macOS"
                }
              },
              "other" : {
                "stringUnit" : {
                  "state" : "translated",
                  "value" : "Other"
                }
              }
            }
          }
        }
      }
    },
    "plural" : {
      "extractionState" : "manual",
      "comment": "Comment for pluralized text.",
      "localizations" : {
        "en" : {
          "variations" : {
            "plural" : {
              "one" : {
                "stringUnit" : {
                  "state" : "translated",
                  "value" : "You have one item."
                }
              },
              "other" : {
                "stringUnit" : {
                  "state" : "translated",
                  "value" : "You have %lld items."
                }
              }
            }
          }
        }
      }
    },
    "substitution" : {
      "extractionState" : "manual",
      "localizations" : {
        "en" : {
          "stringUnit" : {
            "state" : "translated",
            "value" : "%lld: People liked %#@count@ posts."
          },
          "substitutions" : {
            "count" : {
              "argNum" : 2,
              "formatSpecifier" : "lld",
              "variations" : {
                "plural" : {
                  "one" : {
                    "stringUnit" : {
                      "state" : "translated",
                      "value" : "%arg"
                    }
                  },
                  "other" : {
                    "stringUnit" : {
                      "state" : "translated",
                      "value" : "%arg"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "version" : "1.0"
}

Use key when source translation is unavailable #️⃣

By default, strings without the source language content are skipped to avoid importing ID-based keys as value for the source language.

With files from XCode like the example below, add use_key_for_source to features in the upload section to use the key value (My String in the examle) for the source language content.

{  
  "sourceLanguage" : "en",  
  "strings" : {    
     "My String" : {}
  }
}

Keep comments #️⃣

By default, we don’t keep comments in exported files. They are usually not necessary and many times even undesired (e.g., when delivering files over CDN).

To preserve comments for your xcstrings files, add keep_comments to features in the upload section and reupload the files.

Please note, with keep_comments enabled, comments from the input file are used and changes made on Localazy are not reflected. It allows for having different comments added by developers to help them navigate the content of the file, and different comments for translators on Localazy.

Omit state and extractionState #️⃣

When extractionState is provided, Localazy stores it and add it to the exported files. If you don’t want this property to be included in exported files, add omit_extraction to features in the upload section and reupload the files.

In the same way, you can omit state property by adding omit_state to features in the upload section and reupload the files.

Filtering untranslated strings #️⃣

By default, when the output file is generated, Localazy uses texts from the source languages when the translation in the exported language is missing.

This approach is safeguarding you from missing keys that can lead to crashes in some solutions/frameworks.

This feature can be disable by adding filter_untranslated to features in the upload section and reuploading your source language file.