Hello,
how would you recommend to use the stated functions (Exists/GetValue/Evaluate) in an “user”-localized environment.
Situation:
Dependeng on the culture the user has associated in our application, we start the Designer/PrintJob with the according LCID and add the DesignerLanguage and Dictionary entries.
Simple Example:
…
var culture = new CultureInfo(“en”).LCID; //Could be any different language here//Clear dictionary and DesignerLanguages and set values
LL.DesignerWorkspace.DesignerLanguages.Add(culture.LCID);Ll.Variables.Add(“MyItem”, “MyValue”);
//In case of culture fr, the Identifier would be “MyItemFR” and so on
Ll.Dictionary.Identifiers.Add(“MyItem”, “MyItemEN”, culture.LCID);
…
So now in the Designer, the user can use “their” localization to access the variable, when a user with a different culture starts the Designer he/she sees the correct/localized representation.
Designer and Print show the correct output. Great!
Now we have a special situation where a Variable could be present, so userEN adds the following Expression:
If(Exists(“MyItemEN”), True, False).
The Designer shows “True”. But The PrintJob(e.g. Preview) shows false!
And when userFR starts the Designer he also sees false, because userFR does not have the identifier “MyItemEN”.
So the solution for PrintJob would be to use:
If(Exists(“MyItem”), True, False). //The actual id/name of the variable
But this has two drawbacks.
-
Then the Designer shows “false”, because he searches for the localized value.
-
The user does not now the actual id/name of the variable.
(This example with EN is really simplified, the actual identifiers are much more complicated and
nested, the user can not really know them.)
Here are the questions:
-
Is there a “simple” way to provide both information’s in the Designer (the localized-id and the actual-id), so the user can at least see them when using functions like “Exists”?
-
Why does the Designer only evaluate the localized values? I would assume that the none-localized values should also be evaluated correctly. (In this example the “MyItem”)
Maybe this is even a bug and should be evaluated correctly?
Any advice for me, how to achieve the requirement?
Best regards,
Alexander Schneider