Class TranslationController
- Namespace
- GastroSky.Controllers.V1
- Assembly
- GastroSky.dll
All endpoints concerning translations and GastroSky's Glitched Locale Server integration.
[ApiController]
[Authorize]
[Route("api/v1/translations")]
[Produces("application/json", new string[] { })]
public class TranslationController : GastroSkyControllerBase
- Inheritance
-
TranslationController
- Inherited Members
Constructors
TranslationController(ITranslationService)
All endpoints concerning translations and GastroSky's Glitched Locale Server integration.
public TranslationController(ITranslationService translationService)
Parameters
translationServiceITranslationService
Methods
ForceRefresh()
Forces a refresh of the localization cache and fetches the most recent translations from the Glitched Locale Server.
[HttpPost]
[Authorize(Policy = "https://api.gastrosky.ch/identity/claims/resources/translations:W")]
[Route("refresh")]
[ProducesResponseType(200)]
public Task<IActionResult> ForceRefresh()
Returns
GetTranslations(string)
Gets frontend translations as a translation.json file from the Glitched Locale Server for a given localeId.
[HttpGet]
[AllowAnonymous]
[Route("{localeId}")]
[ProducesResponseType(200)]
[ProducesResponseType(404)]
public IActionResult GetTranslations(string localeId)
Parameters
localeIdstringLocale ID as per POSIX ISO/IEC 15897:2011. E.g:
en_US.UTF-8