Class CloudTranslationProvider
Represents server-provided access to translation memories and provides related administrative and maintenance services.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class CloudTranslationProvider
Constructors
CloudTranslationProvider()
Initializes a new instance of the Cloud
Declaration
public CloudTranslationProvider()
Remarks
This is for in-line server side usage and assumes thet the SDL identity has been propagated to the calling Thread.
Exceptions
Type | Condition |
---|---|
System. |
Thrown if the current thread's principal is invalid. |
CloudTranslationProvider(Uri, Boolean, String, String)
Creates a new translation provider server.
Declaration
public CloudTranslationProvider(Uri serverUri, bool useWindowsAuthentication, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverUri | The URI of the server. This is of the form http://servername:port. |
System. |
useWindowsAuthentication | Whether to use Windows authentication. When set to , userName
and password have to be specified. When set to , either pass for userName
and password in order to log on as the currently logged on Windows user, or set userName
to a domain-qualified Windows user name and password to the matching password to log on using basic Windows authentication.
|
System. |
userName | When using custom authentication or basic Windows authentication, the user name of the user. Pass
to use integrated Windows authentication(see useWindowsAuthentication ).
|
System. |
password | When using custom authentication or basic Windows authentication the password of the user. Pass
to use integrated Windows authentication (see useWindowsAuthentication ).
|
CloudTranslationProvider(Uri, String, String)
Creates a new translation provider server.
Declaration
public CloudTranslationProvider(Uri serverUri, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverUri | |
System. |
username | |
System. |
password |
Exceptions
Type | Condition |
---|---|
System. |
Properties
Uri
Gets the URI that was used to connect to this server.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
GetDefaultLanguageResources(CultureInfo)
Gets default language resources for the specified language from the server.
Declaration
public LanguageResourceBundle GetDefaultLanguageResources(CultureInfo language)
Parameters
Type | Name | Description |
---|---|---|
System. |
language | The language for which to get the default language resources. |
Returns
Type | Description |
---|---|
Language |
A Language |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetDefaultLanguageResources(String)
Gets default language resources for the specified language code from the server.
Declaration
public LanguageResourceBundle GetDefaultLanguageResources(string languageCode)
Parameters
Type | Name | Description |
---|---|---|
System. |
languageCode | The language code for which to get the default language resources. |
Returns
Type | Description |
---|---|
Language |
A Language |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetFieldsTemplate(Guid, FieldsTemplateProperties)
Gets the fields template with the specified id
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(Guid id, FieldsTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The fields template ID. |
Fields |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Server |
The fields template, or null if no fields template with given id exists. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetFieldsTemplate(String, FieldsTemplateProperties)
Gets the fields template with the specified path
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(string path, FieldsTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The fields template path. |
Fields |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Server |
The fields template, or null if no fields template with given id exists. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetLanguageResourcesTemplate(Guid, LanguageResourcesTemplateProperties)
Gets the LanguageResourcesTemplate with the specified ID.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(Guid id, LanguageResourcesTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The language resources template ID. |
Language |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Server |
The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetLanguageResourcesTemplate(String, LanguageResourcesTemplateProperties)
Gets the language resources template with the specified path.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(string path, LanguageResourcesTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The language resources template path. |
Language |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Server |
The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetTranslationMemories(TranslationMemoryProperties)
Returns a collection of all the server-based translation memories on this server.
Declaration
public ReadOnlyCollection<CloudBasedTranslationMemory> GetTranslationMemories(TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
Translation |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
System. |
A read-only collection of server-based translation memories. |
GetTranslationMemory(Guid, TranslationMemoryProperties)
Gets the translation memory with the corresponding unique id.
Declaration
public CloudBasedTranslationMemory GetTranslationMemory(Guid id, TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The translation memory's unique id. |
Translation |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Cloud |
The translation memory, or null if no translation memory with given id exists. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetTranslationMemory(String, TranslationMemoryProperties)
Gets the translation memory with the corresponding unique path. Gets a translation memory through its path.
Declaration
public ServerBasedTranslationMemory GetTranslationMemory(string path, TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The translation memory's name. |
Translation |
additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
Server |
The translation memory, or null if no translation memory with given path exists. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |