Better I18NBetter I18N

updateKeys

Update translations for existing keys.

Update translations. Each entry updates ONE language for ONE key. Set isSource=true to update the source text.

Parameters

ParameterTypeRequiredDescription
projectstringYesProject identifier in org/project format
translationsarrayYesArray of translation updates

Translation Object

FieldTypeRequiredDescription
keystringYesKey name (e.g., 'submit_button')
languagestringYesLanguage code (e.g., 'en', 'tr', 'de')
textstringYesTranslation text
namespacestringNoNamespace (default: 'default')
isSourcebooleanNoSet to true to update source text
statusstringNoTranslation status (e.g., 'published')
namespaceContextobjectNoContext for the namespace

Examples

Update a translation

{
  "project": "my-org/my-app",
  "translations": [
    {
      "key": "auth.login.title",
      "language": "tr",
      "text": "Giriş yap"
    }
  ]
}

Update source text

{
  "project": "my-org/my-app",
  "translations": [
    {
      "key": "auth.login.title",
      "language": "en",
      "text": "Log in to your account",
      "isSource": true
    }
  ]
}

Publish a translation

{
  "project": "my-org/my-app",
  "translations": [
    {
      "key": "auth.login.title",
      "language": "tr",
      "text": "Hesabınıza giriş yapın",
      "status": "published"
    }
  ]
}

Batch update

{
  "project": "my-org/my-app",
  "translations": [
    {
      "key": "auth.login.title",
      "language": "tr",
      "text": "Giriş"
    },
    {
      "key": "auth.login.button",
      "language": "tr",
      "text": "Giriş yap"
    },
    {
      "key": "auth.login.button",
      "language": "de",
      "text": "Anmelden"
    }
  ]
}

Response

{
  "success": true,
  "project": "my-org/my-app",
  "keysUpdated": 2,
  "updates": [
    {
      "key": "auth.login.title",
      "language": "tr",
      "status": "updated"
    },
    {
      "key": "auth.login.button",
      "language": "tr",
      "status": "updated"
    }
  ]
}

On this page