public class

I18nResource

extends AbstractResource
java.lang.Object
   ↳ com.atlassian.confluence.plugins.rest.resources.AbstractResource
     ↳ com.atlassian.confluence.plugins.rest.resources.I18nResource

Class Overview

Rest resource for accessing translations in Confluence.

Summary

[Expand]
Inherited Fields
From class com.atlassian.confluence.plugins.rest.resources.AbstractResource
Public Constructors
I18nResource(UserAccessor userAccessor, PluginAccessor pluginAccessor, LocaleManager localeManager, I18NBeanFactory i18NBeanFactory, HttpContext httpContext, SpacePermissionManager spacePermissionManager)
Public Methods
Response get()
This method will always return HTTP 404 (not found) as it can not find any message bundles without a key.
Response getI18n(String pluginKey)
Returns the text for the given key.
[Expand]
Inherited Methods
From class com.atlassian.confluence.plugins.rest.resources.AbstractResource
From class java.lang.Object

Public Constructors

public I18nResource (UserAccessor userAccessor, PluginAccessor pluginAccessor, LocaleManager localeManager, I18NBeanFactory i18NBeanFactory, HttpContext httpContext, SpacePermissionManager spacePermissionManager)

Public Methods

public Response get ()

This method will always return HTTP 404 (not found) as it can not find any message bundles without a key.

public Response getI18n (String pluginKey)

Returns the text for the given key. If the specified plugin key does not exist, or the caller does not have permission to access the plugin texts, the response is HTTP 404 (not found). Note that only JSON is returned. An example URL including a plugin key would look like this: http://host/confluence/rest/prototype/1/i18n/com.atlassian.confluence.tinymceplugin

Parameters
pluginKey The plugin key as it is defined in the atlassian-plugin.xml.
Returns
  • all the translated keys for the given plugin key.