Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

View the Project on GitHub lokalise/elixir-lokalise-api




Translations

Fetch translations

Doc

This endpoint also supports cursor pagination which is now a recommended approach, especially for fetching large amounts of data. Please learn more in the Pagination docs.

{:ok, translations} = ElixirLokaliseApi.Translations.all(@project_id, filter_is_reviewed: 0, page: 2, limit: 1)

translation = hd(translations.items)
translation.translation_id

Fetch a single translation

Doc

{:ok, translation} = ElixirLokaliseApi.Translations.find(project_id, translation_id, disable_references: 1)

translation.translation_id

Update translation

Doc

data = %{
  translation: "Updated!",
  is_reviewed: true
}

{:ok, translation} = ElixirLokaliseApi.Translations.update(project_id, translation_id, data)

translation.translation_id