View Source
Class LanguageController
Backoffice controller supporting the dashboard for language administration.
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[PluginController("UmbracoApi")]
public class LanguageController : UmbracoAuthorizedJsonController, IUmbracoFeature, IDiscoverable
Constructors
View Source
LanguageController(ILocalizationService, IUmbracoMapper)
Declaration
[ActivatorUtilitiesConstructor]
public LanguageController(ILocalizationService localizationService, IUmbracoMapper umbracoMapper)
Parameters
View Source
LanguageController(ILocalizationService, IUmbracoMapper, IOptionsSnapshot<GlobalSettings>)
Declaration
public LanguageController(ILocalizationService localizationService, IUmbracoMapper umbracoMapper, IOptionsSnapshot<GlobalSettings> globalSettings)
Parameters
Methods
View Source
DeleteLanguage(Int32)
Deletes a language with a given ID
Declaration
[Authorize(Policy = "TreeAccessLanguages")]
[HttpDelete]
[HttpPost]
public IActionResult DeleteLanguage(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
GetAllCultures()
Returns all cultures available for creating languages.
Declaration
[HttpGet]
[Authorize(Policy = "TreeAccessLanguages")]
public IDictionary<string, string> GetAllCultures()
Returns
Type |
Description |
IDictionary<System.String, System.String> |
|
View Source
GetAllLanguages()
Returns all currently configured languages.
Declaration
[HttpGet]
public IEnumerable<Language>? GetAllLanguages()
Returns
Type |
Description |
System.Nullable<IEnumerable<Language>> |
|
View Source
GetLanguage(Int32)
Declaration
[HttpGet]
[Authorize(Policy = "TreeAccessLanguages")]
public ActionResult<Language> GetLanguage(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<Language> |
|
View Source
SaveLanguage(Language)
Creates or saves a language
Declaration
[Authorize(Policy = "TreeAccessLanguages")]
[HttpPost]
public ActionResult<Language> SaveLanguage(Language language)
Parameters
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<Language> |
|