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>)
Declaration
public LanguageResourceBundleCollection(List<ILanguageResourceEntity> entities)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ILanguageResourceEntity> | entities |
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 |
---|---|---|
Sdl.Core.Globalization.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. |
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 |
---|---|---|
System.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. |
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 |
Methods
ClearItems()
Removes all items from the collection.
Declaration
protected override void ClearItems()
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 |
---|---|---|
System.Int32 | index | The zero-based index at which |
LanguageResourceBundle | item | The object to insert. |
RemoveItem(Int32)
Removes the item at the specified index of the collection.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to remove. |