By fparker - 7/19/2007
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
|
By Trent L. Taylor - 7/19/2007
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.
|
By fparker - 7/24/2007
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
|
By Trent L. Taylor - 7/24/2007
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.
|
By Fabian R Silva, - - 8/15/2007
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
|
By Trent L. Taylor - 8/15/2007
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
|
By Fabian R Silva, - - 8/16/2007
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 spanishExample: 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!
|
By Trent L. Taylor - 8/16/2007
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.
|
By Ivan George Borges - 8/16/2007
Hi Fabian.Try the: MicroFour.StrataFrame.UI. Localization.MessageLocaleID = 2058I use 1046, but tried 2058 to test and it worked fine, have a look: Abraços.
|
By Fabian R Silva, - - 8/16/2007
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
|
By Fabian R Silva, - - 8/16/2007
thanks Ivan 2058 worked OK thanks again Trent with my basic questions
|
By Fabian R Silva, - - 8/16/2007
note on the ivan picture on the picture 2 say "Gravar" and in spanish "Save" is "Grabar"can I change the source localization data where the browsedialog "autopopulate" this key? (I say change "Gravar" by "Grabar" myself without creating a new custom key) Thanks
|
By Trent L. Taylor - 8/16/2007
How about we just fix the problem and then give you the updated assembly Will that work
|
By Trent L. Taylor - 8/16/2007
The Messages_XXX.xml file generally does not reside on the root of the application. It generally includes the root namespace and any folder it resides in as well in VB.NET.My.Root.namespace.Messages_xxx.xml You can always write a quick program to get the exact name using the GetMenifestResourcenames(): For Each lcString As String In System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames() Debug.WriteLine(lcString) Next
|
By Fabian R Silva, - - 9/5/2007
Thanks for all Trent, Ben and all the people of this great forum.
I leave the localization stuff for a time while trying to build my aplication and I don´t sure why when I put a Localization Key on a custom login, a problem appears :/ (I thinked that it was resolved setting to use the 2058 localization code)
the debug message is "The specified key [UsuarioyClaveTitulo] was not found within the localization database". I try what you recommend:
Sub GetManifestResourceNames()
For Each lcString As String In System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames()
System.Diagnostics.Debug.WriteLine(lcString)
Next
End Sub
result: I see that Message_Languages.xml appears but not Messages_2058.xml
I try to quit and add it again to the project but nothing changed
I add it to both projects I have (Presentation and bussiness objects), but I think it have to be on the BO project, but anyway on both of them can´t see the xml embedded, any idea? meanwhile I continue trying.
Thanks
- Fabian
|
By Fabian R Silva, - - 9/5/2007
Forgive it, I not select Messages_2058.XML on the project and change the property "Build Action" to "Embedded Resource" on it
Sorry
|
By Trent L. Taylor - 9/5/2007
No problem, glad you found it
|