Add a target language to your library

How to add target languages after a library is created.

Endpoint 

https://api.platform.easytranslate.com/strings-library/api/v1/teams/:team-name/libraries/:library-id/languages

In order to add target languages to your library, you need to send a PUT request. 

 
You need to use your autorization Bearer token to be able to send the request.  Simply add token as an attribute to the autorization section of your request and your 
access token as its value.
 

Then, you need to add the following variables' values to your endpoint path:

    • team_name:{{TEAM_NAME}}
      Instead of {{TEAM_NAME}}, you need to provide the team_name of your team. It can be retrieved from the api/v1/user endpoint.
    • library-id: {{LIBRARY_ID}}
      Instead of {{LIBRARY_ID}}, you need to provide the library_id of the library you wish to update by adding a new language. 

 Finally, you need to pass the following data in the body of your request:

{
"data" : {
"type": "library-language",
"attributes": {
"target_languages": ["sw"]
}
}
}
    • Type: The type's value here needs to be "library-language" 
    • Target_languages: The target language value should be the language code of the target language(s) you wish to add to your library. You can find below all the target language's options you have:

Language

Code

Afar

aa

Afrikaans

af

Albanian

sq

Amharic

am

Arabic

ar

Arabic (Egypt)

ar_EG

Arabic (Morocco)

ar_MA

Arabic (Syria)

ar_SY

Arabic (Sudan)

ar_SD

Armenian

hy

Azerbaijani

az

Bambara

bm

Basque

eu

Belarusian

be

Bengali

bn

Blin (Bilin)

byn

Bosnian

bs

Bulgarian

bg

Burmese

my

Catalan

ca

Chechen

ce

Chinese (Simplified)

zh_CN

Chinese (Traditional)

zh_HK

Croatian

hr

Czech

cs

Danish

da

Dari

prs

Dhivehi

dv_MV

Dutch (Belgium)

nl_BE

Dutch (Standard)

nl_NL

Dzongkha

az

English (Australia)

en_AU

English (United Kingdom)

en_GB

English (United States)

en_US

English (South Africa)

en_ZA

Esperanto

eo

Estonian

et

Faeroese

fo

Farsi

fa

Filipino

fil

Finnish

fi

French (Standard)

fr_FR

French (Belgium)

fr_BE

French (Canada)

fr_CA

French (Switzerland)

fr_CH

Frisian

fy

Fula

ff

Galician

gl

Georgian

ka

German

de

Greek

el

Greenlandic

kl

Gujarati

gu

Hausa

ha

Hebrew

he

Hindi

hi

Hungarian

hu

Icelandic

is

Igbo

ig

Indonesian

id

Inuktitut

iu

Italian (Standard)

it_IT

Italian (Switzerland)

it_CH

Japanese

ja

Javanese

jv

Kannada

kn

Kazakh

kk

Khmer

km

Kinyarwanda

rw

Kirundi

rn

Korean

ko

Krio

kri

Kurmanji (Syria)

kmr_SY

Kurmanji (Turkey)

kmr_TR

Kyrgyz

kz

Lao

lo

Latin

la

Latvian

lv

Lingala

ln

Lithuanian

lt

Luxembourgish

lb

Macedonian

mk

Malagasy

mg

Malay

ms

Malayalam

ml

Maltese

mt

Mandingo (Mandinka)

man

Marathi

mr

Moldovian

ro_MD

Mongolian

mn_MN

Nepali

ne_NP

Norwegian (Bokmål)

nb_NO

Norwegian (Nynorsk)

nn_NO

Oromo

om

Pashto

ps

Persian (Farsi)

fa_IR

Polish

pl

Portuguese (Brazil)

pt_BR

Portuguese (European)

pt_PT

Punjabi

pa

Romanian

ro_RO

Romansh (Switzerland)

rm_CH

Romani

rom

Russian

ru

Sami

se_FI

Serbian

sr

Serbian (Montenegro)

sr_ME

Sinhalese

si_LK

Slovak

sk

Slovenian

sl

Somali

so

Sorani

ckb

Sotho

st

Spanish (European)

es_ES

Spanish (Latin America)

es_419

Spanish (Mexico)

es_MX

Swahili

sw

Swedish

sv

Tagalog

tl

Tamil

ta

Telugu

te

Thai

th

Tibetan

bo

Tigre

tig

Tigrinya

ti

Traditional Chinese (Taiwan)

zh_TW

Turkish

tr

Turkmen

tk

Twi

tw

Ukrainian

uk

Urdu

ur

Uzbek

uz

Vietnamese

vi

Welsh

cy

Wolof

wo

Yiddish

yi

Yoruba

yo

Zulu

zu

 

Request example

curl --location -g --request PUT 'https://api.platform.easytranslate.com/strings-library/api/v1/teams/{{TEAM_NAME}}/libraries/{{LIBRARY_ID}}/languages' \
--data-raw '{
"data" : {
"type": "library-language",
"attributes": {
"target_languages": ["sw"]
}
}
}'