StrataFrame Forum

localisation and message

http://forum.strataframe.net/Topic17372.aspx

By Eric Leissler - 6/26/2008

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

 

By Ivan George Borges - 6/26/2008

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

By Eric Leissler - 6/26/2008

hi

thank 's for your answer.

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

"Localization.MessageLocaleID = 1036"

By Ivan George Borges - 6/26/2008

You can do it right after your line setting the MessageXmlPath.
By Eric Leissler - 6/26/2008

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 ??

 

By Ivan George Borges - 6/26/2008

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.

By Eric Leissler - 6/26/2008

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

 

By Michel Levy - 6/26/2008

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

By Ivan George Borges - 6/26/2008

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")

 

By Michel Levy - 6/26/2008

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)

By Eric Leissler - 6/26/2008

Hi Ivan

i 'm leave in MORTAGNE SUR SEVRE, at 9 kilometers to  " LE PUY DU FOU "  on the south of NANTES.
If you come in france to "le puy du fou" , send me a private mail.

Best regards

-----------------------------

Michel, pas de problème. Je ne sais pas ce qui s'est passé. Cela à fonctionné puis plus rien ne marchait dans la localisation,.

Il fichiers xml sont bien copies dans le projet, et inclus

lorsque j'ai remis le path  cela s'est mis à fonctionner.

Comme ca marche maintenant, je n'ose plus y toucher.

>J'ai fait un message de suppression avec un paramètre comme dans la doc et ca fonctionne très bien.

Je poursuis donc mes investigations sur strata avec plaisir.

J'ai beaucoup de progrès à faire en anglais car je n'ai pas tout compris ce que me disait yvan, mais je pense en avoir saisir l'essentiel.

A bientôt

ERic

By Ivan George Borges - 6/26/2008

i 'm leave in MORTAGNE SUR SEVRE, at 9 kilometers to  " LE PUY DU FOU "  on the south of NANTES.
If you come in france to "le puy du fou" , send me a private mail.

I traveled a bit around France, and loved it. If you ever go mad and visit Brazil, let me know. Hehe

J'ai beaucoup de progrès à faire en anglais car je n'ai pas tout compris ce que me disait yvan, mais je pense en avoir saisir l'essentiel.

I can write in Portuguese too, would that help? BigGrin

Don't worry about your english, people seem to understand mine! Anyway, with a bit of patience we get there.

Abraços.

By Eric Leissler - 6/26/2008

Hi, yvan

i live in south of NANTES in "vendée" near "LE PUY DU FOU"

contact me if you come to the puy du fou

Michel is  in south of France. He is the first  strataframer in France. I'm the second.

It's a great product. It's mor difficult for me, because, i speak, read and write english  just a little.

It's more easier for Michel.

Best regards

Eric

By Ivan George Borges - 6/26/2008

Merci Eric, I had a look at the Puy du Fou website, and it looks great!!! Definitely worth a visit.

By the way, consider attending a SF class, you would profit a lot from it (http://www.strataframe.net/newsarticle.aspx?newsarticle=4)

There is one now in July, I will be there. It is a huge help and a great time spent with the guys.

By Trent L. Taylor - 6/26/2008

Michel,

Thanks for sharing that information and helping!  We truly appreciate your business and look forward to seeing more and more users come from your area!

I always enjoy learning about the areas and locations of our users as I am a big fan of history and enjoy looking these types of things up.  Thanks again for sharing.

By Michel Levy - 6/26/2008

Trent,

when do we organize a SF class in Europe? in France, or in Czech Republic, or anywhere else??
2009 or 2010?
we could help to organize it if you are ready to come in our old continent.

By Trent L. Taylor - 6/27/2008

That sounds like a great idea and something that we should work towards.  This might be able to happen in 2009 or 2010.  I would lean toward 2010 as we are going to try our first out of country training in Brazil.  With any luck, we hope to plan and organize a Brazil training class in 2008 sometime.  Once we work through that process, then Europe would be a perfect next location!  I know that I would love to come over there and train...and I am sure that my wife won't let me go without here to this one Smile