Skip to main content

Unanswered Question InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0RSS Feed

(0)

pamtaro
pamtaro

Member

Member

3 points

4 Posts

InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

 My silverlight application is getting localized to 8 different language, 3 of which are Korean, Japanese, and Simplified Chinese.  When I run the application on a machine that has these languages installed, it works fine. But when I try to run it on a machine that doesn't have East Asian languages installed in Windows, I get error code 2105 - InitializeError, Failed to load pre-requisites for the application.  If I take out these 3 languages, the browser with the SL app loads fine.  Is this a bug?  Why would I expect another user's computer to have these East Asian languages installed?  If its not installed on the OS shouldn't Silverlight just use my default language?  I'd like to be able to just have one xap thats portable instead of two in expectation that some computers won't have East Asian language packs installed.

StefanWick
StefanWick

Contributor

Contributor

2866 points

439 Posts

Microsoft

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

Do you have the localized strings in satellite resource assemblies? If so, do you have them listed in the AppManifest.xaml?

When the app loads, all assemblies listed in the AppManifest.xaml will be loaded. The loading of the localized assembly will fail if the corresponding culture is not supported by the current configuration. The workaround would be to remove the assemblies from the AppManifest.xaml and load them on demand based on the user's actual configuration.

Let me know if this works for you.

Thanks, Stefan Wick

Microsoft Silverlight | http://blogs.msdn.com/swick/

pamtaro
pamtaro

Member

Member

3 points

4 Posts

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

Nope, my AppManigfest.xml doesn't list my resource assembly. In order to load the localized strings of different cultures, I've had to unload my silverlight project, edit the .csproj file, and add the culture i have between the <SupportedCultures>..</SupportedCultures> tag.  The app wouldn't load the localized resources if I didn't specify it in those tags.  Western languages worked fine, but adding any East Asian languages in SL causes it to crash because the East Asian language support is optional in Windows, there's a checkbox that needs to be checked off in Control Panel > Regional and Language Options for the East Asian language files to be installed. 

jordanhammond
jordanha...

Member

Member

190 points

104 Posts

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

Hi, just comfirmed that I have the same problem.  Seems to be a big in Silverlight.  I have an app that supports many cultures, however if the client machine does not have the language pack installed, and the culture is defined in the SupportedCultures tag, then the app fails to load.

This is a pretty serious flaw.

StefanWick
StefanWick

Contributor

Contributor

2866 points

439 Posts

Microsoft

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

If you are creating a single XAP for multiple cultures, you can create satelite assemblies for each culture that contain the localized string resources. Be sure to NOT list them in the AppManifest.xaml file, but instead on-demand load them as appropriate. This will ensure that only the assemblies that are requrested per the user's configuration are being loaded, and thus you won't hit an exception for cultures that aren't installed on the client's machine.

Thanks, Stefan Wick

Microsoft Silverlight | http://blogs.msdn.com/swick/

jordanhammond
jordanha...

Member

Member

190 points

104 Posts

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

StefanWick:

If you are creating a single XAP for multiple cultures, you can create satelite assemblies for each culture that contain the localized string resources. Be sure to NOT list them in the AppManifest.xaml file, but instead on-demand load them as appropriate. This will ensure that only the assemblies that are requrested per the user's configuration are being loaded, and thus you won't hit an exception for cultures that aren't installed on the client's machine.

Thanks, Stefan Wick

 

Hi Stefan, thanks for the info, this is exactly the only other option that I thought there was.   Pretty annoying hack though.  What I was after was more along the lines of an official statement from MS on MSDN that this is a bug, and that a patch is being worked on.  That and an online code demo to show users who have to code for internationalization how to go about such a work-around.

skygragon
skygragon

Member

Member

16 points

19 Posts

Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

StefanWick:

Do you have the localized strings in satellite resource assemblies? If so, do you have them listed in the AppManifest.xaml?

When the app loads, all assemblies listed in the AppManifest.xaml will be loaded. The loading of the localized assembly will fail if the corresponding culture is not supported by the current configuration. The workaround would be to remove the assemblies from the AppManifest.xaml and load them on demand based on the user's actual configuration.

Let me know if this works for you.

Thanks, Stefan Wick

is there any changes about localization in 2.0RTW?

because i encounterred error2105 with the same issue on a PC without chinese language supportted, however the codes worked fine in 2.0beta2 on the same pc.

cokkiy
cokkiy

Member

Member

2 points

1 Posts

Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

I also encounter this error on SL 2.0, I thinks it's bug, MS should remove this.

The God created the world.
The programer made the world easy.

slyi
slyi

Participant

Participant

858 points

267 Posts

Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

I can verify this bug aswell, did you try language fallback like on the sample to get around this issue on http://wpf-e.spaces.live.com/blog/cns!2B248D261D0E0035!407.entry

manor
manor

Member

Member

41 points

44 Posts

Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

Do you have sample code on for this workaround? Thanks!

paupdb
paupdb

Member

Member

8 points

15 Posts

Re: Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

I have the same issue as reported - my application supports English and Chinese.

My Silverlight application is for intranet use, so really size of the xap is the least of my worries.
Adding code to stream in the satellite assemblies on-demand is extra coding and maintenance that I would prefer to do without.

Has this issue been fixed in SL 3?

StefanWick
StefanWick

Contributor

Contributor

2866 points

439 Posts

Microsoft

Re: Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

Yes, this is fixed in SL 3.

Thanks, Stefan Wick

Microsoft Silverlight | http://blogs.msdn.com/swick/

BKrishna
BKrishna

Member

Member

112 points

70 Posts

Re: Re: Re: Re: InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0

I too am facing the same problem. Can any one please suggest a workaround for this in silverlight 2.

  • Unanswered Question
  • Answered Question
  • Announcement