1.com.my
    Related Categories: FeaturesWeb BluePrint
    Multilingual Flash
    November 6th, 2007 | Posted by Pin

    latest-figure.jpg

    When we enter the website, the sentences shown in the Flash banner will be in its original language, which is English. The variable and data (sentences) that shown in the Flash are stored in a php file. When want to change the contents of website to another language, the php file will call to translation part.

    Process of forming the translation file are as below:
    A tool, gettext is run in order to extract all the translatable strings from the sources (which stored in php) and implant them in a single .POT file.

    This .POT file is actually a .PO (Portable Object) template that you distribute to your translators in order for them to translate it.

    The translators will send you back a .PO file, containing both the original English version and
    the translated strings.

    After that, compilation of the .PO file into a .MO (Machine Object) file is done. It is stored at
    the correct place in the defined directory and file naming organization.

    Then, the _() function in the php file will automatically display the translated strings in the Flash banner at that website, depending on the locale set at runtime.

    Flash file

    We used Flash as the platform to display the data that are called from a php file. Inside Flash, a set of Action Script is written in order to get the data from php file that is stored in server. A simple script will load the php file and get the variables contain in it and output the data in text field which is located in the flash. Below are the coding part:

    PHP

    The php file will get call from script. Once the data are checked, it will call the translation part. The _( ) function in php file is very important as the data written within the brackets will be the gettext for file.PO.
    Below are the variable and data for php file:

    Translation

    When php file calls for translation, the data within _( ) function will be the gettext in form of file.PO. This is the language that read by human. Once the file is saved, the PO program will auto generate the saved file as MO (Machine Object) file. This MO file is actually the language which read by machine.

    Download the sample for flash here

    You may want to take a look at our related posts
    Read on the go: handpicked articles from this site

    No Responses to “Multilingual Flash”

    Leave your comment

    Name (required)
    Email (required) (will not be published)
    Website

    Contact us
    I'd like to enquire about... Choose your next step!
    This Month's Response Time: 12 Mins
    Search 1.com.my
     
    Recent Comments
    Pin: 06VKEX4-0KMBZJ0-VMXFYQ9-EK5ZT2G-4E6BY4
    Pin: Tips: 1) IMAP folder path is INBOX 2) Postbox email client
    Pin: Preview: Switching to IMAP - Understand IMAP; Change from POP
    Pin: Issues with POP 1. Outlook loads slowly after you have years o
    Pin: You are right. In quick, we register domain name for our customer
    Categories
                                     
    Other Startups
    Srvrc.com: Web Hosting Marketplace
    a4trip.com: Buy Travel Guide Online
    escrow.my: Malaysia Escrow Service
    essasu.com: Advertisement Marketplace
    eVisaasia.com: Quick Travel Visa
    Friends: Web Developer Alliance
    American Venus download dvd Candy download movie Charlotte Sometimes download movie Broken English download movie Bon Cop, Bad Cop download movie BloodRayne II: Deliverance download movie Candy download movie Charlotte Sometimes download movie Broken English download movie Bon Cop, Bad Cop download movie BloodRayne II: Deliverance download movie generic viagra in canada
    Copyright © 1999-2011 1.com.my
    All Rights Reserved