Along with your translated files, the so-called metafiles are also available through the CDN - you can get them in JSON, Javascript, or Typescript.

Metafiles contain additional information that can help you, e.g., make the language selector completely manageable from within Localazy.

From the metafile, you can get:

  • filename and path for each of the files
  • all languages for each of the files, including:
    • locale code
    • English and localized name
    • URL to CDN for each of the languages
    • function for resolving plural form (in JS/TS file)
    • timestamp of the last update

Get your metafile URL in the Localazy UI #️⃣

Go to the Translation Delivery section in your project and select CDN. Then click on the Metafile URL button to get your URL. Localazy CDN - Metafile URL

Get metafile URL via Localazy API #️⃣

You can also get your metafile URL via the Localazy Public API. Learn more about API: CDN options in the documentation.

Example metafile #️⃣

Metafile, e.g. for JavaScript can look like this:

const localazyMetadata = {
  "projectUrl": "",
  "baseLocale": "en",
  "timestamp": 8000445088587515945,
  "files": {
    "f7c17299cdf3c25566850c9f12e1884f52ac237a": {
      "file": "file.ts",
      "path": "src/modules/guided-tours/tours/add-language-tour/locale",
      "library": "",
      "module": "",
      "buildType": "",
      "productFlavors": [ ],
      "locales": [
          "language": "en",
          "region": "",
          "script": "",
          "isRtl": false,
          "name": "English",
          "localizedName": "English",
          "uri": "/_a816546212130918361adf3ad9/_e0/f7c17299cdf3c25566850c9f12e1884f52ac237a/en/file.ts",
          "plural": (n) => { return (n===1) ? "one" : "other"; }
          "timestamp":  8070729385790395926
          "language": "cs",
          "region": "",
          "script": "",
          "isRtl": false,
          "name": "Czech",
          "localizedName": "Čeština",
          "uri": "/_a816546212130918361adf3ad9/_e0/f7c17299cdf3c25566850c9f12e1884f52ac237a/cs/file.ts",
          "plural": (n) => { return (n===1) ? "one" : (n>=2 && n<=4) ? "few" : "other"; }
          "timestamp":  8070729385790395926

export default localazyMetadata;