localisation and message


Author
Message
Eric Leissler
Eric Leissler
StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)StrataFrame User (321 reputation)
Group: StrataFrame Users
Posts: 0, Visits: 527
hi,

So in first excuse my english. Im a french novice in strataframe.

i made a project  named   "hera"

in module localisation, i made en herastra  and in this module, i made an message  with de key "coucou"

after i generate xml in folder

 "C:\Users\eric\Documents\xmlhera"

in  appmain.vb module,  its was the following code

Private Shared Sub InitApplication(ByVal e As InitializingApplicationEventArgs)

'-- Add the main form type

'-- If more than one form is added to the collection, they can be chosen by showing a "Gateway" form

' and supplying the index of the form to show (At least 1 form type must be added to the collection

e.Forms.Add(GetType(hera.MENU))

'-- ToDo: Add any extra application initialization

MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("hera")

MicroFour.StrataFrame.UI.Localization.MessageXmlPath = ""

 

in my form test ,  i have a button  and the code when cklick is :

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Me.ShowMessageByKey("coucou")

End Sub

 

when i run this project  i obtain the following error :

 

so in my project   "solutions preference "

hi have

 

 

what is the problem ??

i test with  in appmain the following code

MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("hera")

MicroFour.StrataFrame.UI.Localization.MessageXmlPath = "C:\Users\eric\Documents\xmlhera"

 

and its same problem.

 

can you help me ?

Have you an idee ?

 

Thank's

Best regards

Eric LEISSLER

 


Replies
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi Ivan,

yesterday, I've told Eric how to start with localisation and messaging (we 2 both live in France, and he was not too far from my home), and I've shown him how to "embed" xml file in the project. I think he forgets to copy xml files in the project itself and I can see an error in xml files properties (bad compilation option)

Eric,

dans ton main (dans la méthode InitApplication), tu dois placer:


MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML
MicroFour.StrataFrame.UI.Localization.MessageXmlPath =
"" ' parceque les fichiers xml sont incorporés
MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1036

Tu ne dois pas mentionner le chemin des fichiers xml (tu pourrais même supprimer la ligne), mais il ne faut pas oublier de copier les fichiers générés dans le projet.

Et surtout, regarde la feuille de propriétés des fichiers xml dans ton projet, tu dois absolument mettre l'action de génération à "Ressource incorporée"

Blush je sais, je sais, j'ai oublié de te le montrer...

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Glad you got it going!

Hey guys, where in France are you both from?

Also, Eric, if you don't want to give a path for your XML files and would like to use the embedded ones, you can try Registering your embedded XML files, and erase the line where you provide the MessageXmlPath:

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "YourNameSpace.Message_Languages.xml")

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "YourNameSpace.Messages_1036.XML")

 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Eric Leissler - 18 Years Ago
Ivan George Borges - 18 Years Ago
Eric Leissler - 18 Years Ago
Ivan George Borges - 18 Years Ago
Eric Leissler - 18 Years Ago
Ivan George Borges - 18 Years Ago
Eric Leissler - 18 Years Ago
Michel Levy - 18 Years Ago
Ivan George Borges - 18 Years Ago
Michel Levy - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Eric Leissler - 18 Years Ago
Ivan George Borges - 18 Years Ago
Eric Leissler - 18 Years Ago
Ivan George Borges - 18 Years Ago
Michel Levy - 18 Years Ago
Trent L. Taylor - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search