# MTLocalizedCollection

The MTLocalizedCollection object holds the collection of all localized entries.

## Program ID

Metratech.MTLocalizedCollection.1

## MTLocalizedCollection Methods

Add | Internal use only.
Begin | Sets an internal iterator to the beginning of the collection.
Clear | Clears the internal collection.
End | Returns a 1 if the internal iterator points beyond the collection'’ last element; otherwise it returns a 0.
Find | Returns the MTLocalizedEntry object according to the specified fqn and language code.
Item | Returns MTLocalizedEntry object at a specified index in collection.
Next | Moves to the next IMTLocalizedEntry object in the collection.

## MTLocalizedCollection Properties

Count | Gets the number of localized entries.
FQN | Gets and puts the Fully Qualified Name
LanguageCode | Not used currently.
LocalizedString | Gets and puts the localized string
Namespace | Gets and puts the namespace
Size | Gets the the number of localized entries and returns the MTLocalizedEntry object at a specified index in the collection.

## MTLocalizedCollection Enumerated Types

MTLocalizedEntry | INTERNAL USE ONLY; Properties Get and Set through top level object - MTLocaleConfig.

## Example

Example to be provided in a future release of this online help system.

# Method Detail

## Add

Internal use only.

### Visual Basic Syntax

Sub Add(__MIDL_0015 As MTLocalizedEntry)

### C++ Syntax

HRESULT Add(IMTLocalizedEntry*);

### Arguments

IMTLocalizedEntry*

The object to add to the collection.

### Return Value

The MTLocalizedEntry object.

## Begin

Sets an internal iterator to the beginning of the collection.

### Visual Basic Syntax

Sub Begin()

### C++ Syntax

[id(7), helpstring("method Begin")] HRESULT Begin();

STDMETHODIMP CMTLocalizedCollection::Begin()

{Iterator = mLocalizedMap.begin();

return S_OK;

}

## Clear

Clears the internal collection.

### Visual Basic Syntax

Sub Clear()

### C++ Syntax

[id(5), helpstring("method Clear")] HRESULT Clear();

## End

Returns a 1 if the internal iterator points beyond the collection's last element; otherwise it returns a 0.

### Visual Basic Syntax

Function End() As Long

### C++ Syntax

[id(10), helpstring("method End")] HRESULT End([out, retval] int* true_false);

### Return Value

1 if the internal iterator points beyond the collection's last element; 0 otherwise.

## Find

Returns the MTLocalizedEntry object according to the specified fully qualified name (fqn) and language code.

### Visual Basic Syntax

Sub Find(fqn As String, lang As String, val As String)

### C++ Syntax

HRESULT Find(BSTR fqn, BSTR lang, VARIANT* val);

### Arguments

fqn

The fully qualified name.

lang

The language code.

### Return Value

The MTLocalizedEntry object by specified fqn and language.

## Next

Moves to the next MTLocalizedEntry object in the collection.

Use:

Coll->Begin();
while(!coll->End())
item=coll->Next();

### Visual Basic Syntax

Function Next()

### C++ Syntax

[id(9), helpstring("method Next")] HRESULT Next([out, retval] VARIANT *pVal);

### Return Value

The next MTLocalizedEntry object in the collection.

# Property Detail

## Count

Returns the number of localized entries.

This is a read-only property.

### Visual Basic Syntax

Property Count As Long

### C++ Syntax

HRESULT Count([out, retval] long *pVal);

### Return Value

The collection size.

## FQN

Get and set the Fully Qualified Name.

### Visual Basic Syntax

Property LanguageCode As String

### C++ Syntax

HRESULT FQN([out, retval] BSTR *pVal);

HRESULT FQN([in] BSTR newVal);

### Return Value

The Fully Qualified Name.

## LanguageCode

Get and set the language code.

### Visual Basic Syntax

Property LanguageCode As String

### C++ Syntax

HRESULT LanguageCode([out, retval] BSTR *pVal);

HRESULT LanguageCode([in] BSTR newVal);

### Return Value

The language code.

## LocalizedString

Gets and Puts Localized String

### Visual Basic Syntax

Property LocalizedString As String

### C++ Syntax

HRESULT LocalizedString([out, retval] BSTR *pVal);

HRESULT LocalizedString([in] BSTR newVal);

### Return Value

The Localized String

## Size

Gets the the number of localized entries and returns the MTLocalizedEntry object at a specified index in the collection.

This is a read-only property.

### Visual Basic Syntax

Property Size As Long

### C++ Syntax

HRESULT Size([out, retval] long *pVal);

### Return Value

The collection size.

## Item

Returns MTLocalizedEntry object at a specified index in collection.

This is a read-only property.

### Visual Basic Syntax

Function Item(aIndex as Long) as String

### C++ Syntax

HRESULT Item(long aIndex, [out, retval] VARIANT *pVal);

### Arguments

aIndex

The index for the object to retrieve.

### Return Value

MTLocalizedEntry object

## Namespace

Gets and sets the namespace.

### Visual Basic Syntax

Function Item(aIndex as Long) as String

### C++ Syntax

HRESULT Namespace([out, retval] BSTR *pVal);

HRESULT Namespace([in] BSTR newVal);

### Return Value

The namespace