Localizing the Browse Dialog


Author
Message
fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
What is the recommended way to localize the search field captions and the column headings on the results grid of the Browse Dialog?  In addition, what is the best way to localize the standard components of the Browse Dialog? I see that the control offers properties for setting the text of all of its components but I don't see any localization keys.  Do I need to use the RetrieveTextValue method in my code and then set the Browse Dialog's Text properties as appropriate?  Thanks for your help.

Fran Parker

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
What is the recommended way to localize the search field captions and the column headings on the results grid of the Browse Dialog?

You can do this in code with the RetrieveTextValue method for the fields.

MyBrowse.SearchFields.Item("myField").FieldLabelText = MicroFour.StrataFrame.UI.Localization.RetrieveTextValue("MyKey")

addition, what is the best way to localize the standard components of the Browse Dialog?

The BrowseDialog components are already translated in 8 languages and you do not have to do anything.  Those fields will allow you to overwrite the values, but if you only need support for English, Spanish, Portuguese, Danish, German, French, Italian, or Russian then you don't have to do anything.  When the MessageLocaleID is set to any of these languages the BrowseDialog will follow suit.

fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
Trent,

Thanks for your help - I'm no longer having a problem with my search field captions or my column headings.  Unfortunately, I am still having a problem with the standard portions of the form.  I use the MicroFour.StrataFrame.UI.Localization.ShowAvailableLanguages() method in my code to allow the user to select a language.  I have verified that after the user makes a selction, the value of MicroFour.StrataFrame.UI.Localization.MessageLocaleID has changed but it has no affect on the BrowseDialog.  Are there database tables or XML files that contain the localized values that I need to distribute with my app?  Or can you think of something else that I am missing?  Thanks again.

Fran Parker


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Are there database tables or XML files that contain the localized values that I need to distribute with my app?

No.  The localized XML files are embedded within the UI assembly.  If you hard code the MessageLocaleID to 1046, for example, in the AppMain and then run your application, do you get the Portuguese translations for the BrowseDialog?  If so, does French do the same thing?  Try this first and we can go from there.

Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
When I see the form on development / design mode, I see all the text in spanish but when I run the application I see all the localization text in english, what I do wrong?



I hard-Coded on appmain the localization ID to 11274 (spanish - argentina) and try with spanish - spain but nothing, I can set my own text and asign the Key to take that but can´t keep the default values



I attached 2 images to show this



another issue is the combobox that show in grey (I not set nothing special on this), how I can avoid this? thanks



- Fabian
Attachments
edit.jpg (109 views, 25.00 KB)
run.jpg (132 views, 24.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The functionality between design-mode and run-time is actually the same with one difference.  When in design-mode, we set the MessageLocaleID based on the active language on your OS.  However, in your application, you must set this value yourself.  If you open up the AppMain file and go to the InitApplication method, you will see that the MessageLocaleID is trying to pull an active language.  More than likely you do not have a languages file out there so it assumes english.  You can just hard code this value as well.  For example, to make Portuguese show up at run-time, I will just set this value to 1046.

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1046

Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
I using Windows XP with a regional configuration "Español - Argentina" and set messageLocaleID to 11274 on appMain but cannot see by default the navigation bar and other controls in spanish

Example: I test the securitySample, when I view the form in design mode this show "NUEVO" on the Add button, but when I run the form it show ADD

I changed in appMain

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1034; //MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("SecuritySample");

or

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 11274 ; //MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("SecuritySample");

Thanks!


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
After looking at the translation project, we have the Spanish versions set for Mexico and Argentina.  Do we need to add another?  Did it work when you set it to 11274?  Does it work when you set it to 2058?  If not, then you will probably need to manually call the RegisterEmbeddedXML and re-register the localization files.


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Fabian.

Try the:

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 2058

I use 1046, but tried 2058 to test and it worked fine, have a look:

Abraços.

Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Trent, with 2058 worked, I don´t known why with 11274 doesn´t work.

anyway, I will create a Localization project with 2058 Español - Mexico and use it for now

I have a RegisterEmbeddedXmlFile problem? I dont sure but try to call (after reading a post on the forum)


MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(System.Reflection.Assembly.Load("MicroFour StrataFrame UI, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7", "Messages_11274.XML")

and .net say when I copy this line that the method "Load" can't be called with those arguments

Thanks for all your help BigGrin


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search