views:

36

answers:

2

Hi

I've built a multilingual ASP.NET web app and no problem . I'm trying to put a flash header for this website so I've made couple flash in different language ( because they are different not just in language , they have tiny different because of different cultures ) . But my problem is i don't know how to load specific flash while switching different language .

Any solution ?

+1  A: 

if you have a language variable inside your ASP.NET page script, then you can just load

<embed src="flash_header_<%= language_variable %>.swf" />  

something like that. Then it will load different swf. I've put down asp.net long time ago, so the code maybe wrong but the concept is there

Unreality
+1  A: 

If it were me, I would create a resource file for each language (which you might have done already, depending on how you have implemented internationalisation), and simply store the different SWF file name in each file.

Then when you are writing out the SWF embed code, just dynamically read the file name from the resource files and you will get the correct file name for the current culture. Something like:

<embed src="<%=Resources.text.SWFFileName%>.swf" />

I found this article quite helpful when it came to resource files.

Mark B
hey nice copy of the embed code from my answer , even with the word "flash_header_" :p
Unreality
Well, I was halfway through my answer and I saw it pop up, so I thought I'd save myself some typing :)
Mark B
Edited now, please don't sue me... :P
Mark B
lol ...........
Unreality
Thank you , That worked , This way :<embed src='<%$ Resources:resource,MenuType %>' runat="Server" ...
Mostafa