Localization needs to be taken care of inside the SWF;  the only thing
SWFObject does is embed the SWF on the page.

Assuming you build your SWF to be able to handle different languages, you'll
need to pass a string identifying which language to use to your SWF.  This
is where SWFObject can help.  Off the top of my head, I can think of three
ways to pass a variable specifying the language to your SWF:

1. When embedding the SWF in the HTML (usually during initial page load)
using SWFObject's flashvars object. It would look something like this
(assuming your SWF is equipped to use an ActionScript variable named
"language")

<script type="text/javascript">

var flashvars = { language: "swahili" };
var params = {};
var attributes = {};
swfobject.embedSWF("myContent.swf", "myContent", "300", "120",
"9.0.0","expressInstall.swf", flashvars, params, attributes);

</script>


2. Dynamically at any time using Flash's ExternalInterface class (there are
EI examples on my
site<http://pipwerks.com/lab/swfobject/ExternalInterface/2.0/index.html>and
bobby's
site<http://www.bobbyvandersluis.com/swfobject/testsuite_2_1/test_dynamic_com.html>
).

3. You can also specify a language by placing the language name in the URL
(via querystring [?] or fragment identifier [#]) and have your SWF examine
the URL without using any JavaScript.  Try examples like
this<http://www.flexer.info/2007/11/28/access-the-query-string-variables-from-flex-application/>and
this <http://evolve.reintroducing.com/2008/07/03/as3/as3-querystring/>.

The URL with a querystring would look like:
www.mysite.com/index.html?language=swahili
The URL with a fragment identifier would look like:
www.mysite.com/index.html#swahili

I'm sure there are other wasy to do it, too.  :)

Hope that helps
- philip



On Fri, Oct 24, 2008 at 10:45 AM, B3 <[EMAIL PROTECTED]> wrote:

>
> I'm trying to create flash headers that change languages when the
> language of the site is changed.  I've seent his done before and I was
> directed to ask here.  Can anyone help me or point me to a tutorial so
> I can have this feature?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to