Languages
Languages are used to manage the different language and locale versions of your project. By default, Type CMS supports 32 languages but offers the flexibility to add as many languages to your project as necessary. When you create a language, it becomes available in the entry editor and you can then translate your content from your project's default language to the target language. When querying your content you can also provide the language to pull the correct version of your content for the audience requesting it.
get
List all languages in a project
Required attributes
projectId | string | Your projectId |
Optional attributes
None |
Request
get
/api/projects/:projectId/languages
Response
get
Retrieves a single language based on the provided language ID
Required attributes
projectId | string | Your project ID |
languageId | string | The ID of the language to retrieve |
Optional attributes
None |
Request
get
/api/projects/:projectId/languages/:languageId
Response
post
Adds a new language to your project
Required attributes
projectId | string | Your project ID |
id | string | The ISO 639 code of the language to add |
title | string | The title or name of this language |
Optional attributes
fallback | string | The ISO 639 code of the language to fallback to when content is not available for this translation |
Request
post
/api/projects/:projectId/languages
Response
patch
Updates attributes for a language.
Required attributes
projectId | string | Your project ID |
languageId | string | The ID of the language to update |
Optional attributes
id | string | The ISO 639 code of the language |
title | string | The title or name of the language |
fallback | string | The ISO 639 code of the language to fallback to when content is not available for this translation |
Request
patch
/api/projects/:projectId/languages/:languageId
Response
delete
Deletes a language from your project.
Required attributes
projectId | string | Your project ID |
languageId | string | The ID of the language to remove |
Optional attributes
None |
Request
delete
/api/projects/:projectId/languages/:languageId
Response
Last modified 7/6/2024, 5:26:06 PM