localisation and message


Author
Message
Eric Leissler
Eric Leissler
StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 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

 


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 Eric.

I see your Message_Languages.xml is not embedded within your application. You could go this way, but it is recommended to use an embedded Message Store. You can check it out on the help file, under "Application Framework" / "Localization & Messaging" / "Messaging" / "Configuring the Message Store".

Regarding the error you are getting, I couldn't read it, but in your InitApplication, try setting your current language this way, to see if it works:

Localization.MessageLocaleID = 1036


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

thank 's for your answer.

I don't understand vhere  i have to place the code ?

"Localization.MessageLocaleID = 1036"

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
You can do it right after your line setting the MessageXmlPath.
Eric Leissler
Eric Leissler
StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)
Group: StrataFrame Users
Posts: 0, Visits: 527
hi,

i  made my code as the example in the strataframe help

in my appmain,

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.MessageLocaleID = 1036

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

in my project

i generate the xml

 

 my xml is embedded

 

and when i run its don't find  the key  "coucou"

 

and when running

 

I  dont understand what i forget ??

 


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
As it looks like, you are not providing the XML Path.

Try this way: (note that I am assuming you are generating your XMLs into C:\Users\eric\Documents\xmlhera)

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

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

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1036

Also, I would advice you to embed your Message Store into your application, and if you would like to try, let me know... and we can go through it together.


Eric Leissler
Eric Leissler
StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)StrataFrame User (215 reputation)
Group: StrataFrame Users
Posts: 0, Visits: 527
thank's yvan

its ok now

i dont know what but i made  in my 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.MessageLocaleID = 1036

MicroFour.StrataFrame.UI.Localization.MessageXmlPath = "C:\heradevvbstrata\hera\hera\NewFolder1"

and  with this code, it s ok at running

thank you very much

Best regards

Eric LEISSLER

 


Michel Levy
Michel Levy
StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 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 (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
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")

 


Michel Levy
Michel Levy
StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Ivan

I live in south of France, near Béziers, and so, near Mediteranean sea. Beziers is a small town in Languedoc, where is the biggest vineyard all over the world. My main apps are used in wine production, specific warehouse for wines storage, trading and sales of wine...

Eric lives near Puy-du-Fou, in west of France.

We are both old VFP developpers, and the 2 first StrataFrame users here in France.
(BTW, I gave a presentation of StrataFrame at our last french VFP devcon)

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