Class LanguageResourceBundleCollection
Represents a collection of language resource bundles within a translation memory (
Inheritance
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class LanguageResourceBundleCollection : ObservableCollection<LanguageResourceBundle>
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
Constructors
LanguageResourceBundleCollection()
Creates a new, empty language resource bundle collection.
Declaration
public LanguageResourceBundleCollection()
Remarks
This constructor should typically only be used by implementers of ILanguageResourcesTemplate or ITranslationMemory.
LanguageResourceBundleCollection(List<ILanguageResourceEntity>)
Represents a collection of language resource bundles within a translation memory (
Declaration
public LanguageResourceBundleCollection(List<ILanguageResourceEntity> entities)
Parameters
Type | Name | Description |
---|---|---|
List<ILanguageResourceEntity> | entities |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
Properties
Item[CultureCode]
Gets the language resource bundle for the given language, if it exists in this collection.
Declaration
public LanguageResourceBundle this[CultureCode language] { get; }
Parameters
Type | Name | Description |
---|---|---|
CultureCode | language | The language. |
Property Value
Type | Description |
---|---|
LanguageResourceBundle | The language resources bundle for the specified language, or null if no such language resource bundle exists. |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
Item[String]
Gets the language resource bundle for the given language code, if it exists in this collection.
Declaration
public LanguageResourceBundle this[string languageCode] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | languageCode | The language code. |
Property Value
Type | Description |
---|---|
LanguageResourceBundle | The language resources bundle for the specified language, or null if no such language resource bundle exists. |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
ResourceDataAccessor
Gets a reference to the internal resource data accessor used to access the resource storage.
Declaration
public IResourceDataAccessor ResourceDataAccessor { get; }
Property Value
Type | Description |
---|---|
IResourceDataAccessor |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
Methods
ClearItems()
Removes all items from the collection.
Declaration
protected override void ClearItems()
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
InsertItem(Int32, LanguageResourceBundle)
Inserts an item into the collection at the specified index.
Declaration
protected override void InsertItem(int index, LanguageResourceBundle item)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index at which |
LanguageResourceBundle | item | The object to insert. |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.
RemoveItem(Int32)
Removes the item at the specified index of the collection.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index of the element to remove. |
Remarks
Changes to this collection should be persisted by saving the translation memory or the language resources template to which the collection belongs.