Class LanguageResourceBundleCollection
Represents a collection of language resource bundles within a translation memory (ITranslationMemory.LanguageResourceBundles) or a language resources template (ILanguageResourcesTemplate.LanguageResourceBundles). A language resource bundle holds custom language resources for a certain language (abbreviation, ordinal followers, variables and segmentation rules).
Inheritance
Implements
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class LanguageResourceBundleCollection : ObservableCollection<LanguageResourceBundle>, IList<LanguageResourceBundle>, ICollection<LanguageResourceBundle>, IList, ICollection, IReadOnlyList<LanguageResourceBundle>, IReadOnlyCollection<LanguageResourceBundle>, IEnumerable<LanguageResourceBundle>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
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 |
---|---|---|
ListILanguageResourceEntity | entities |
Properties
this[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. |
this[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. |
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()
Overrides
InsertItem(int, LanguageResourceBundle)
Inserts an item into the collection at the specified index.
Declaration
protected override void InsertItem(int index, LanguageResourceBundle item)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index at which |
LanguageResourceBundle | item | The object to insert. |
Overrides
RemoveItem(int)
Removes the item at the specified index of the collection.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the element to remove. |