Class FileBasedLanguageResourcesTemplate
A language resources template implementation (ILanguage
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class FileBasedLanguageResourcesTemplate : ILanguageResourcesTemplate, ISupportPlaceables
Constructors
FileBasedLanguageResourcesTemplate()
Creates a new file-based language resources template.
Declaration
public FileBasedLanguageResourcesTemplate()
FileBasedLanguageResourcesTemplate(Guid)
Creates a new file-based language resources template with the provided ID. This is useful during copying.
Declaration
public FileBasedLanguageResourcesTemplate(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
FileBasedLanguageResourcesTemplate(String)
Loads a file-based language resources template from the specified file.
Declaration
public FileBasedLanguageResourcesTemplate(string filePath)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | The location where the template should be loaded from. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown if |
Properties
Description
Gets or sets the description of this template.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
FilePath
Gets the location where this language resources template is located.
Declaration
public string FilePath { get; }
Property Value
Type | Description |
---|---|
String |
Id
gets the unique id of this template.
Declaration
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
Guid |
LanguageResourceBundles
Gets the collection of language resource bundles in this template.
Declaration
public LanguageResourceBundleCollection LanguageResourceBundles { get; }
Property Value
Type | Description |
---|---|
Language |
Name
Gets or sets the name of this template. Not that this is not necessarily the same as the file name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Recognizers
Gets or sets the recognizers which are enabled for this template.
Declaration
public BuiltinRecognizers Recognizers { get; set; }
Property Value
Type | Description |
---|---|
Builtin |
TokenizerFlags
Gets or sets the flags affecting tokenizer behaviour for this language resource template.
Declaration
public TokenizerFlags? TokenizerFlags { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Tokenizer |
WordCountFlags
Gets or sets the flags affecting word count behaviour for this language resource template.
Declaration
public WordCountFlags? WordCountFlags { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Word |
Methods
Refresh()
Reloads the template from the file.
Declaration
public void Refresh()
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown when trying to call this method on an unsaved template. |
Save()
Saves the template to the location specified in File
Declaration
public void Save()
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if this template has not been saved before. Use SaveAs and specify a file path instead. |
Save(Stream)
Saves this template to the specified stream.
Declaration
public void Save(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to which the template should be saved. |
SaveAs(String)
Saves the template to the specified location. This also updates the current File
Declaration
public void SaveAs(string filePath)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | The location to save the template to. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
ToString()
A language resources template implementation (ILanguage
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |