Skip to main content

site/localization (GET)


Retrieve a resource string localized for the current user, or provided culture (OBSOLETE: use GET:site/localization/{resource})

  • REST Method: GET
  • Method Access: public

Query Parameters

Name Type Description
lang string? Optional language code to use for resource localization
resource string resource name to retrieve

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Not Found 404 Could not find requested resource

Message Format

Input: None

Output: The resource string
Content-Type: text/plain

Implementation Notes

The collection of all existing resource strings and localizations can be found in the /web/resources directory of a MindTouch installation.

Please contribute to translating resources and help MindTouch achieve better localization!

Curl Code Sample: Retrieve Localized Resource String

The following command retrieves a specified, localized resource string. In this context, a resource is a file containing a list of strings paired keys representing MindTouch UI text instructions. Each language has its own unique resource file. The language can be be set in the "lang" parameter. The resource string key is defined through the "resource" parameter. The resource documents are located on the MindTouch file system. If a requested resource does not exist, a 404 Not Found HTTP response will be returned.

The following sample will fetch a German (de) resource string for key [Login] error.auth (represented as login.error.auth):

Sample Code

curl -u username:password -i http://mindtouch.address/@api/deki/site/localization?lang=de&resource=login.error.auth

Sample Response from executing Code

Content-Type: text/plain

Ungültiger Benutzername oder Passwort angegeben!

Implementation notes 

curl flags

Provides external user authentication.
Outputs the HTTP response headers. Useful for debugging.
  • Was this article helpful?