Locale
Locale
CreateAsync
This call lets you add a new language to your stack. You can either add a supported language or a custom language of your choice.
| Name | Type | Description |
|---|---|---|
| model (required) | LocaleModel | Locale Model for creating locale. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale().CreateAsync(model);Delete
The Delete language call deletes an existing language from your stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Locale("<LOCALE_CODE>").Delete();DeleteAsync
The Delete language call deletes an existing language from your stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("<LOCALE_CODE>").DeleteAsync();Fetch
The Get a language call returns information about a specific language available on the stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Locale("<LOCALE_CODE>").Fetch();FetchAsync
The Get a language call returns information about a specific language available on the stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("<LOCALE_CODE>").FetchAsync();Query
The Query on locale allow to get the list of all languages (along with the language codes) available for a stack.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Locale().Query();Update
The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.
| Name | Type | Description |
|---|---|---|
| model (required) | LocaleModel | Locale Model for creating locale. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Locale("LOCALE_CODE>").Update(model);UpdateAsync
The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.
| Name | Type | Description |
|---|---|---|
| model (required) | LocaleModel | Locale Model for creating locale. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
LocaleModel model = new LocaleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Locale("LOCALE_CODE>").UpdateAsync(model);