Elixir interface for the Lokalise APIv2.
View the Project on GitHub lokalise/elixir-lokalise-api
{:ok, languages} = ElixirLokaliseApi.SystemLanguages.all(page: 3, limit: 2)
language = hd(languages.items)
language.lang_iso
{:ok, languages} = ElixirLokaliseApi.ProjectLanguages.all(project_id, page: 3, limit: 2)
language = languages.items |> hd
language.lang_iso
{:ok, language} = ElixirLokaliseApi.ProjectLanguages.find(project_id, lang_id)
language.lang_id
data = %{
languages: [
%{
lang_iso: "fr",
custom_iso: "samp"
},
%{
lang_iso: "de",
custom_name: "Sample"
}
]
}
{:ok, languages} = ElixirLokaliseApi.ProjectLanguages.create(project_id, data)
languages.items
data = %{
lang_name: "Updated"
}
{:ok, language} = ElixirLokaliseApi.ProjectLanguages.update(project_id, lang_id, data)
language.lang_name
{:ok, resp} = ElixirLokaliseApi.ProjectLanguages.delete(project_id, lang_id)
resp.language_deleted