Multilanguage Text


The Internet has changed how we view the world, how we do business and how we communicate with others. It used to cost a fortune to talk to friends around the globe, or take a long time to correspond with them through the mail. Now with the Internet being the fastest growing means of communication, its nothing to talk to several people in different countries at the same time, all in real time. And even though it is now easier than ever to keep up a conversation with someone with a 12 hour time difference, it still does not necessarily break the language barrier. Flash understands this, and has built in several different methods of communicating your message in different languages.

The first way to do this is to use Unicode-encoded text.

Unicode-encoded Strings

We briefly went over Unicode-encoded strings in Chapter 9, where you used special codes to represent characters. You can use the same technique to have text of different languages. Follow the example below to see how this works:

1.

Create a new Flash document.

2.

Draw a dynamic text field on the stage with the font being Times New Roman and an instance name of myText_txt.

3.

Select Anti-alias for readability for the anti-aliasing option, and click the embed button.

4.

Select Lowercase, Greek and Hebrew from the list and hit OK.

5.

Create a second layer called actions and open the Actions panel in the first frame of this layer, and add these actions.

 myText_txt.text = "hello world \u05E2\u03BB\u20AC\u05E3\u03BC\u20AA"; 

Now test the movie, and you should see a string that says "hello world."

NOTE

In order to use this technique, you must embed the glyphs you need, and it must be either a dynamic or input text field.


That was one way to make text appear multi language. And to find out more about Unicode-encoding, check out http://www.unicode.org. But that is not the only way to make your text multi-lingual, you can also use the Strings panel.

The Strings Panel

The Strings panel is designed to help you create multi-lingual text and to keep up to date. You can specify several different languages, and have translators actually make the translation for you, but Flash will decide which language to use based on the user's system. Follow these steps to see how it would work:

1.

Create a new Flash document.

2.

Open the Strings panel (Window>Other Panels>Strings) like Figure 15.13 and click the Settings button to open the Strings settings like Figure 15.14.

Figure 15.13. The Strings panel.


Figure 15.14. The Strings panel settings for choosing which languages to support as well as the default language.


3.

Select the languages you want from the list on the left.

4.

Select a default language and leave the other options at their default settings and hit OK.

5.

Back in the Strings panel, place "1" in the ID field and "This is a test" in the String field and click Apply.

Notice it changes your ID from "1" to "IDS_1".

6.

Close the String panel, save your file to the desktop and publish.

Notice you will have a folder for each language on your desktop now, and inside is an XML document for translators to use and put the translated text in.

7.

Once you have the translated text, you will go back into the Strings panel and import the correct XML file for each language. You will notice the grid filling up with the correct information from the XML doc.

Then your done, you can publish your file again to ensure all the proper XML documents are set, and now your files should be able to support all the languages you selected.




Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net