Count: Integer;
The property is read-only.
The Count property returns the number of languages, into which a dictionary is translated.
Collection capacity is the number of elements a collection can contain. The Count property is the number of elements actually contained in the collection. Capacity always exceeds or equals to the Count property value. If capacity of the Count property is exceeded when a new style is added to the collection, the capacity automatically increases.
Executing the example requires an MDM repository that contains the MDM dictionary. The repository identifier is RDS_REPO, the dictionary identifier is RDS_DICT. It is also necessary to add links to the Metabase and Rds system assemblies.
Sub UserSub;
Var
Mb: IMetabase;
RdsRepoDescr: IMetabaseObjectDescriptor;
RdsDict: IRdsDictionary;
DictTransl: IRdsDictionaryTranslations;
i: Integer;
Transl: IRdsDictionaryTranslation;
Begin
Mb := MetabaseClass.Active;
RdsRepoDescr := Mb.ItemById("RDS_REPO");
RdsDict := Mb.ItemByIdNamespace("RDS_DICT", RdsRepoDescr.Key).Bind As IRdsDictionary;
DictTransl := RdsDict.Translations;
For i := 0 To DictTransl.Count - 1 Do
Transl := DictTransl.Item(i);
If Transl.Locale = DictTransl.DefaultLocale Then
Debug.WriteLine(Transl.Name);
End If;
End For;
End Sub UserSub;
On executing the example, all settings used to translate a dictionary into different languages are reviewed by search method. If the language, for which the setting is set, and the language, assigned as the default language for a dictionary, are similar, a dictionary name is displayed in the console window in this language.
See also: