Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

LocBaml and WinFX Feb CTP

Closed Thread
 
Thread Tools Display Modes
Old 03-30-2006   #1 (permalink)
Stephane - Montpellier
Guest


 

LocBaml and WinFX Feb CTP

I tried the following sample from Windows SDK
(ms-help://MS.MSSDK.1033/MS.WinFXSDK.1033/wpf_conceptual/html/5001227e-9326-48a4-9dcd-ba1b89ee6653.htm#create_sample_app)
with february CTP, and I noticed several problems when adding new cultures to
my project.

When I modify my HelloApp.ressource.dll assembly by extracting CSV file with
LocBaml, and regenerate it after modifications, it works if I keep en-US
culture.

If I try to generate a new ressource.dll with a new culture (ex fr-FR), my
program systematicaly fails with an unknown file exception (Window1.baml not
found).

here is the command i used :

LocBaml.exe /generate en-US\HelloApp.resources.dll /trans:Hello.csv
/out:d:\HelloApp\bin\debug\fr-FR /cul:fr-FR

Any issue about this ?






Old 04-01-2006   #2 (permalink)
Ashish Shetty [MSFT]
Guest


 

Re: LocBaml and WinFX Feb CTP

(I'm assuming you managed to generate the satellite resources DLL but
running the application results in error)
Can you try using mage.exe (it ships with the SDK) and update the
application's manifests to include the new resource DLL? Perhaps that is the
missing link.

--
Ashish Shetty [MSFT]
Program Manager, Windows Presentation Foundation (Avalon)
Blog: http://nerddawg.blogspot.com



"Stephane - Montpellier" <Stephane - Montpellier@discussions.microsoft.com>
wrote in message news:319A049A-203E-4602-866E-ED708762B945@microsoft.com...
>I tried the following sample from Windows SDK
> (ms-help://MS.MSSDK.1033/MS.WinFXSDK.1033/wpf_conceptual/html/5001227e-9326-48a4-9dcd-ba1b89ee6653.htm#create_sample_app)
> with february CTP, and I noticed several problems when adding new cultures
> to
> my project.
>
> When I modify my HelloApp.ressource.dll assembly by extracting CSV file
> with
> LocBaml, and regenerate it after modifications, it works if I keep en-US
> culture.
>
> If I try to generate a new ressource.dll with a new culture (ex fr-FR), my
> program systematicaly fails with an unknown file exception (Window1.baml
> not
> found).
>
> here is the command i used :
>
> LocBaml.exe /generate en-US\HelloApp.resources.dll /trans:Hello.csv
> /out:d:\HelloApp\bin\debug\fr-FR /cul:fr-FR
>
> Any issue about this ?
>
>
>
>
>
>



Old 04-04-2006   #3 (permalink)
Stephane - Montpellier
Guest


 

Re: LocBaml and WinFX Feb CTP

I tried your manip, but unfortunately it didn't solve my problem.

Anyway, we decided to use an other solution, which consists in using resx.

So i created a Class named Localizer and derivating "MarkupExtension" to
help me in resx management in my different assemblies, with a virtual method
named GetResourceManager.

Then, when i use it in my xaml window (i reference the namespace where
Localizer class is, and i use bindings like this :
<TextBlock Text="{myNS:MyClass Id='MyResxItem'} />

and it works fine, but it uses the Resource file of my Localizer class.

Now, in my prjoject, I create a new class derivating the first one, and i
override the GetResourceManager method, to use my local resource file.

I reference my local namespace in my Window.xaml file, update the binding
tags in my UI control, and then, i always have a compiler error :

"The value '{Loc:MyLocalizer}' is not a valid MarkupExtension expression.
Cannot resolve 'MyLocalizer' in namespace 'clr-namespace:LocalizeMe'.
'MyLocalizer' must be a subclass of MarkupExtension. "

If i put this class in an other assembly, it works fine. Do you have an idea ?

"Ashish Shetty [MSFT]" wrote:

> (I'm assuming you managed to generate the satellite resources DLL but
> running the application results in error)
> Can you try using mage.exe (it ships with the SDK) and update the
> application's manifests to include the new resource DLL? Perhaps that is the
> missing link.
>
> --
> Ashish Shetty [MSFT]
> Program Manager, Windows Presentation Foundation (Avalon)
> Blog: http://nerddawg.blogspot.com
>
>
>
> "Stephane - Montpellier" <Stephane - Montpellier@discussions.microsoft.com>
> wrote in message news:319A049A-203E-4602-866E-ED708762B945@microsoft.com...
> >I tried the following sample from Windows SDK
> > (ms-help://MS.MSSDK.1033/MS.WinFXSDK.1033/wpf_conceptual/html/5001227e-9326-48a4-9dcd-ba1b89ee6653.htm#create_sample_app)
> > with february CTP, and I noticed several problems when adding new cultures
> > to
> > my project.
> >
> > When I modify my HelloApp.ressource.dll assembly by extracting CSV file
> > with
> > LocBaml, and regenerate it after modifications, it works if I keep en-US
> > culture.
> >
> > If I try to generate a new ressource.dll with a new culture (ex fr-FR), my
> > program systematicaly fails with an unknown file exception (Window1.baml
> > not
> > found).
> >
> > here is the command i used :
> >
> > LocBaml.exe /generate en-US\HelloApp.resources.dll /trans:Hello.csv
> > /out:d:\HelloApp\bin\debug\fr-FR /cul:fr-FR
> >
> > Any issue about this ?
> >
> >
> >
> >
> >
> >

>
>
>

Old 04-04-2006   #4 (permalink)
Gary Yang -MSFT
Guest


 

RE: LocBaml and WinFX Feb CTP

Thanks for trying out LocBaml. I am still very interested to know what might
have gone wrong in your case.

Your error message may indicate that the CLR framework did not find the
resource assembly in the first place. In order to load the localized French
resource assembly, you need to change the system locale to fr-FR (or change
the Thread.CurrentUICulture). Is this the case for you?

"Stephane - Montpellier" wrote:

> I tried the following sample from Windows SDK
> (ms-help://MS.MSSDK.1033/MS.WinFXSDK.1033/wpf_conceptual/html/5001227e-9326-48a4-9dcd-ba1b89ee6653.htm#create_sample_app)
> with february CTP, and I noticed several problems when adding new cultures to
> my project.
>
> When I modify my HelloApp.ressource.dll assembly by extracting CSV file with
> LocBaml, and regenerate it after modifications, it works if I keep en-US
> culture.
>
> If I try to generate a new ressource.dll with a new culture (ex fr-FR), my
> program systematicaly fails with an unknown file exception (Window1.baml not
> found).
>
> here is the command i used :
>
> LocBaml.exe /generate en-US\HelloApp.resources.dll /trans:Hello.csv
> /out:d:\HelloApp\bin\debug\fr-FR /cul:fr-FR
>
> Any issue about this ?
>
>
>
>
>
>

Old 04-05-2006   #5 (permalink)
Stephane - Montpellier
Guest


 

RE: LocBaml and WinFX Feb CTP

Thanks for your answer. Of course I modified my Thread.CurrentUICulture in
order to test a new culture. That's why i'm surprised from this error.


"Gary Yang -MSFT" wrote:

> Thanks for trying out LocBaml. I am still very interested to know what might
> have gone wrong in your case.
>
> Your error message may indicate that the CLR framework did not find the
> resource assembly in the first place. In order to load the localized French
> resource assembly, you need to change the system locale to fr-FR (or change
> the Thread.CurrentUICulture). Is this the case for you?
>
> "Stephane - Montpellier" wrote:
>
> > I tried the following sample from Windows SDK
> > (ms-help://MS.MSSDK.1033/MS.WinFXSDK.1033/wpf_conceptual/html/5001227e-9326-48a4-9dcd-ba1b89ee6653.htm#create_sample_app)
> > with february CTP, and I noticed several problems when adding new cultures to
> > my project.
> >
> > When I modify my HelloApp.ressource.dll assembly by extracting CSV file with
> > LocBaml, and regenerate it after modifications, it works if I keep en-US
> > culture.
> >
> > If I try to generate a new ressource.dll with a new culture (ex fr-FR), my
> > program systematicaly fails with an unknown file exception (Window1.baml not
> > found).
> >
> > here is the command i used :
> >
> > LocBaml.exe /generate en-US\HelloApp.resources.dll /trans:Hello.csv
> > /out:d:\HelloApp\bin\debug\fr-FR /cul:fr-FR
> >
> > Any issue about this ?
> >
> >
> >
> >
> >
> >

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
LocBaml not creating valid csv file Whitey Avalon 0 10-04-2007 02:49 PM
Globalization issue with locbaml keerthana_m_2003@yahoo.com Avalon 0 07-24-2006 02:36 AM
WinFX SDK for WPF Kumar Lomash Vista General 1 06-06-2006 08:22 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50