We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?

We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?  I use the Flash on a Mac OSX 10.10.3

Are you familiar with JavaScript?

It does not completely answer your question, but the text displayed on the screen from any language (ActionScript/CreateJS / [insert the programming language]) generally all following the same path. Each language has a file stored in some form of key = value style, named through the language and the country of your choice, for example en_US.json

Any language would allow the user to choose regional settings. The application would then grab the appropriate file and everywhere where the text is needed, the script must be using a (usually global or singleton) variable/service that can get the text of the requested key.

for example if I wanted a user to have a confirmation of dialogue who said 'are you sure?"with buttons for 'Yes' and 'No', I would have (for me), an Englishman, USA base file en_US.json with these values, for example:

en_US. JSON example:

{

'CONFIRM_YES_NO': ' are you sure?

'YES': '' Yes. ''

'NO': 'no '.

}

Then you use simply JS/AJAX to read this file. You analyze, or simply JSON decode in an object, or manually, depending on what suits your needs. When you want to display any text, you use the object (variable, maintenance, etc.) you have stored these values.

for example calling to display function confirm dialogue:

Nickname... but if you understand...

and this comes from jQuery UI (see here)

function confirmDialog() {}

$(«#dialog-confirmer»).dialog({)

Title: LocalizationObject ['CONFIRM_YES_NO'],

buttons:]

{

text: LocalizationObject ["YES"],

Click: function() {/ / do something for 'yes '.

}

{

text: LocalizationObject ["NO"],

Click: function() {/ / do something to the 'no '.

}

]

});

}

Please consider loosely. 'LocalizationObject' is a variable object or service that returns the appropriate text for the key that you provide. In this case, he provided the key 'CONFIRM_YES_NO', 'YES' and 'NO', which must be on the right answer for this key, localized.

Again, this is not a manual on how to do it via Flash Pro but it's the general conceptual way you could do it in any language. There are a variety of other ways to do it, but it's a very simple way, as long as you keep your key names at least wake up verbose. A key name such as LocalizationObject ["ABC123"] is not really tell you what the key can be referred. Also nest them contributes greatly, as LocalizationObject ["UI'] ['DIALOGUES'] ['CONFIRM'] ['YES_NO'] = ' are you sure? It just shows I nested the title of the dialog within the user interface, because it is the text that appears in the user interface rather than content. Then inside dialog boxes that may contain a variety of different dialog boxes. Then inside her CONFIRM type of dialogue. Finally, the type is a dialogue YES_NO type (as opposed to OK_CANCEL or JUST_OK, etc.). Whole set makes it easy to understand what the text of reading: UI YES_NO confirm DIALOG boxes.

I hope that from here you can see that you need to review everywhere you display text on the screen and centralize it in a sort of object (function or variable) of your choice. You must store the external language files to prevent unnecessarily load the other languages as well as an easy to modify Setup.

The rest is just using basic JavaScript.

Just be ready for the most difficult challenge. At least for me. The size of the text in several languages is very different, and in some cases requires the loading of special fonts. This can make layout in a very difficult dynamic environment. Always thinking all text how big or small can be in any particular and plan field on this size more and shrink so that to handle this situation correctly.

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • Backup of files filled my D drive. Now what?

    Play with my computer, I found something that says I need to back up my files that I made. However, it filled my disk (d :)) then said that failing because it doesn't have enough space to save all of my files.) Now I get messages that there is no mor

  • Upgrade Vista to Windows 7, need product key

    I have a computer that was originally purchased with Windows Vista on it. I am now anting upgraded to Windows 7 and have a question before doing so. I bought a disc to upgrade to 7 through my University and the disk, it says that you need a product k

  • Layout and properties on the created dynamically containers

    I want to show multiple rows of tiles (3 x 2 on portrait, 2 x 3 on the landscape or square screen). I have a ComponentDefintion for a line which is a container with StackLayout LeftToRight. To this, I add the tiles. And the ComponentDefintion of the

  • File encryption

    Recently, I changed my OS from windows 8 PRO for Windows 7 Ultimate. Due to a problem of drivers, but when I was with Windows 8, I encrypted my files and folders with certificate. But now I formatted my C: drive and files in other Ar encrypted Partit

  • By clicking on the image does not show in the links Panel

    Has this changed?When I click on an image (within a framework of) the selected image used to be highlighted in the links Panel, so you can easily identify what image you are using.This does not happen on my version (v11.4.0.90). I guess this or has t