IMetabaseObjectNames.FindByLocale

Syntax

FindByLocale(Value: LocaleCodeID): IMetabaseObjectName;

FindByLocale(Value: Prognoz.Platform.Interop.ForeSystem.LocaleCodeID): Prognoz.Platform.Interop.IMetabase.IMetabaseObjectName;

Parameters

Value. Language.

Description

The FindByLocale method searches names by a specified language among all objects names.

Example

Executing the example requires that the repository contains an object with the OBJECT identifier that has the name for the Spanish language (Argentina).

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Obj:IMetabaseObjectDescriptor;
    NamesL : IMetabaseObjectNames;
    NameLocale:IMetabaseObjectName;
Begin
    MB := MetabaseClass.Active;
    Obj := MB.ItemById("OBJECT").EditDescriptor;
    NamesL := Obj.Names;
    NameLocale := NamesL.FindByLocale(LocaleCodeID.Spanish_Argentina);
    NameLocale.Name := "Escenario";
    Obj.SaveDescriptor;
End Sub UserProc;

Imports Prognoz.Platform.Interop.ForeSystem;

 

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Obj:IMetabaseObjectDescriptor;
    NamesL : IMetabaseObjectNames;
    NameLocale:IMetabaseObjectName;
Begin
    MB := Params.Metabase;
    Obj := MB.ItemById["OBJECT"].EditDescriptor();
    NamesL := Obj.Names;
    NameLocale := NamesL.FindByLocale(LocaleCodeID.lcidSpanish_Argentina);
    NameLocale.Name := "Escenario";
    Obj.SaveDescriptor();
End Sub;

The name for the Spanish language is changed for the object after executing this example.

See also:

IMetabaseObjectNames

Related work items

Requirement 87503