开发者

How to load specific flash while switching different lang in ASP.NET web application?

I've built a m开发者_开发问答ultilingual 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 ?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜