Skip to main content
Microsoft Silverlight
Home Forums Silverlight Programming Report a Silverlight Bug InitializeError, Failed to load pre-requisites for the application with East Asian languages in RC0
12 replies. Latest Post by BKrishna on September 7, 2009.
(0)
pamtaro
Member
3 points
4 Posts
10-02-2008 7:08 PM |
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
Contributor
2866 points
439 Posts
10-16-2008 1:07 AM |
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
10-16-2008 12:23 PM |
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.
jordanha...
190 points
104 Posts
10-20-2008 5:54 AM |
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.
10-20-2008 11:53 PM |
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.
10-21-2008 2:11 AM |
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
16 points
19 Posts
11-23-2008 9:11 PM |
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
2 points
1 Posts
12-07-2008 1:05 AM |
I also encounter this error on SL 2.0, I thinks it's bug, MS should remove this.
slyi
Participant
858 points
267 Posts
12-09-2008 10:48 AM |
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
41 points
44 Posts
01-27-2009 10:25 AM |
Do you have sample code on for this workaround? Thanks!
paupdb
8 points
15 Posts
04-15-2009 9:47 PM |
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?
04-18-2009 9:57 AM |
Yes, this is fixed in SL 3.
BKrishna
112 points
70 Posts
09-07-2009 5:57 AM |
I too am facing the same problem. Can any one please suggest a workaround for this in silverlight 2.