SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
360|Flex
Indianapolis, IN
Oğuz Demirkapı
CTO | NicheClick Media | http://NicheClick.com


CREATING OUR FIRST I18N
(ÎÑŢÉRÑÄŢÎÖÑÅĻÎŽÅŢÎÖÑ)
FLEX APPLICATION
About Me
 • CTO at NicheClick Media
 • Coding since ‘85, CGI Programming since ’94
 • ColdFusion Developer since ’97 (Flex since ‘07)
 • Adobe Certified Expert
 • Founder and Manager (prev) of CFUG for Turkey
 • Manager of Orange County Adobe Developers User Group
 • Interested in ColdFusion, Flex, AIR, Ajax, Frameworks, i18N,
   L10N, G11N
 • Have big interest in Epistemology
 • Living in Dana Point, CA
 • Personal blog: http://blog.demirkapi.net
i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   2
Agenda

  What you may expect?
  i18N Theory & Basics
  Flex & i18N
  Resources
  Questions & Answers




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   3
What You May Expect?

 Open Your Eyes, if;                                                              May be not for you, if;
  You are a i18N newbie                                                           You are already using i18N
  You heard that you should                                                        in Flex in production
   create i18N applications                                                        You think I know everything
  You need to get idea about                                                       about i18N implementation
   i18N usage                                                                       on Flex 
  You want to get some tips




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net                     4
Do we need multilingualism?

  Yes!




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   5
Why i18N (Internationalization)?

  English is just another language!
  The World Wide Web should be truly world-wide!
  Internationalization is important to ensure that users
   worldwide can equally benefit from Web technology
  Wide diversity world-wide:
        •     Scripts (Latin, Cyrillic, Hebrew, Tamil, Katakana,...)
        •     Languages (English, German, Turkish, Korean, Japanese,...)
        •     Typographic conventions
        •     Cultural conventions
        •     Political circumstances
  Avoid fragmentation of specifications due to localization
  Make sure internationalization is done at the right place
i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   6
What is …?

  What is i18N (Internationalization)?
       Application functions in at least two locales
  What is L10N (Localization)?
       Process of applying a locale or language quot;skinquot; to an i18N
            application
  What is G11N (Globalization)?
       i18N & L10N




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   7
Globalization & Localization

 Internationalization                                                             Localization
  Single character set                                                            Based on globalized
  Single executable                                                                software
  Single install                                                                  Adds specific translations
                                                                                    and adaptations for
  Single server serves all
                                                                                    particular languages and
        clients in all languages
                                                                                    markets


  Globalized software can be localized without any code changes

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net                    8
Character encoding

        Character encoding specifies mappings from a
        character set to the integer numbers that
        represent the characters on a computer.

       EUC-JP (Japanese)
       EUC-KR (Korean)
       ISO-8859-1 (Western European and English)
       SHIFT_JIS (Japanese)
       UTF-8 (All Languages)
i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   9
What is Locale?

  The combination of a language and a country code

        en_US: US English (color, $)
        en_GB: British English (colour, £)
        de_CH: German in Switzerland
        tr_TR: Turkish in Turkey




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   10
Selecting Locale

  Manual
        • Default locale can be loaded and other options would
              be available by selection via buttons/selects etc.
  Locale Detection
        • Capabilities.language property in Flash Player and AIR
        • Parsing ‘Accept-Language’ header on HTTP request
           Not usable with URLLoader
        • Parsing browser and OS language settings via
          JavaScript
        • Location detection depending on IP

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   11
Problems

  Charset Conversions                                                                    Collation
  Formatting & Parsing                                                                ◦   Searching, Sorting, Matching
   Date & time                                                                           Segmentation
   Messages                                                                           ◦   word, line, …
   Numbers & currencies                                                                  Transforms
                                                                                       ◦   Normalization
  Translated Names
                                                                                       ◦   Casing
   Languages, Regions (Countries),
    Scripts, Time zones, Currencies                                                    ◦   Transliterations
                                                                                          Unicode Regular Expressions
  Calendar, Time Zone, Date/Time
        conversions                                                                       Complex-Text Display / Input
                                                                                          …



i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net                             12
What is Unicode?

  Unicode (unicode.org) is an character set for all the
   characters and symbols of the world.
  Unicode provides a unique number for every
   character.
  Except Klingon! 

                                                                         ‫ما هي الشفرة الموحدة quot;يونِكودquot; ؟‬
        Unicode nedir?
        Τι είναι το Unicode
        Cos'è Unicode?
        유니코드에 대해?
        Что такое Unicode?
i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net               13
Unicode (cont.)

  Why do we need to use Unicode?
        • Avoids data corruption
        • Single encoding for text in all languages
        • Makes software globalization possible
               Vastly reduces development cost
               Vastly reduces maintenance, update and support cost

  Switching to Unicode has no disadvantages for single language
   users, to the contrary it usually offers advantages even for single
   language users. And it offers great advantages for multilingual
   users.
  Encoding: Use Unicode wherever possible for content, databases,
   etc. Always declare the encoding of content.

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   14
Unicode (cont.)

  Non-Globalized Component
        • Does not use Unicode
        • Hard-coded date/time formatting & parsing
        • Hard-coded number & currency formatting & parsing
        • Hard-coded collation (sorting/searching/matching)
        • Other hard-coded operations
        • Hard-coded literals




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   15
Unicode & Files

  UTF-8 is the recommended encoding for files.
  Use a Unicode capable editor (IDE)

  Flex Builder
        • Default encoding is UTF-8
  Eclipse
        • Default encoding is Cp1252
        • Change it into UTF-8
           Window-> Preferences -> General -> Workspace
                     Text file encoding

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   16
Unicode & Database

  Use a robust database with right settings
        •     MS SQL Server
        •     MySQL Server
        •     PostgreSQL Server
        •     Oracle
  Beware of Unicode Support
        • MySQL 4.1 and up
          default-character-set=utf8
        • MS SQL Server
           SQL Server nvarchar, ntext etc.

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   17
Flex & i18N

  Flex 3 has embedded i18N features

  It is possible to create i18N applications in Flex 2
        • Using ResourceBundle class
        • Different approaches such as XML usage etc.




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   18
Localization in Flex

  Resource Bundles
        • Idea is based on Java resource bundles technique
        • Every locale has a localized version of properties files
        • Creating localized files may need resource bundle
              managers
               Attesoro (attesoro.org)
               Eclipse Plug-in (sourceforge.net/projects/eclipse-rbe/)
               RBMan (Flex Application) (rbman.riaforge.org)
        • Binary assets such as audio files, video files, SWF files, and
              images can be referenced
               flag=Embed(quot;images/flag_us.pngquot;)
  Every locale needs to create localized properties files

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   19
Localization in Flex

  Beware that properties files in Flex encoded in
   UTF8.
  You can edit directly with a Unicode capable
   editor.
  Most of the resource bundle editors will have
   issues with Unicode encoded properties files.
  RBMan is the tool to manage all these and
   embed to your current applications.

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   20
DEMO


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   21
Localization in Flex - 2

  Properties files can be compiled as resource
   bundles
 OR
  Properties files can be loaded at run time by
   resource modules




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   22
Localization in Flex - 3

  Flex lets you change locales on the fly
        • If you compile more than one resource bundle into an
              application, you can toggle the resource bundle based on
              the locale
  If you compile resource modules
        • You can load and unload the SWF files at run time based
          on the locale
        • You can create new resource bundles programmatically
  If your application supports many locales, you will
        likely want to load the appropriate resources at run
        time rather than compile all supported resources
        into the application at compile time.

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   23
Accessing The Values in Resource Bundles

  Bind values from the resource to an expression
        •     @Resource directive
        •     Available only in MXML
        •     Cannot change locales at run time
        •     Only returns Strings
  Methods of the ResourceManager class
        • Can be used also in ActionScript
        • Can return data types other than Strings, such as ints,
          Booleans, and Numbers (getNumber(), getBoolean())
        • Can be used to switch locales at run time
        • Not supported in Flex Builder or ANT FlexTasks and needs
          to use command line

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   24
Accessing The Values in Resource Bundles

  Compiling as Runtime Shared Libraries
        • Saves re-compiling your bundles every time while compiling the
              main application
  Compiling into Component Modules
        • Separation of dependencies with the main application
  Manually loading into the resourceManager at runtime
        • Remoting can be used to load the required resources from the
          server
        • Have to have a connection to the server retrieve the bundles
        • Modifiying the resource bundles on the server without having to
          re-compile / re-deploy the application is possible


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   25
Using the @Resource Directive

  Sample
        <mx:FormItem label=quot;@Resource(key=‘username',
          bundle=‘myRB')quot;>
          <mx:TextInput/>
        </mx:FormItem>
  Compile Parameters
        -locale=en_US -allow-source-path-overlap=true -source-path=locale/{locale}




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   26
Using the ResourceManager

  Using the ResourceManager
        <mx:Metadata>
          [ResourceBundle(quot;myRBquot;)]
          [ResourceBundle(quot;myOtherRBquot;)]
        </mx:Metadata>




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   27
Using the Resource Classes

  On an ActionScript
        <mx:Script><![CDATA[
        import mx.resources.ResourceBundle;
        import mx.controls.Alert;
        private function registrationComplete():void {
            Alert.show(resourceManager.getString(‘myRB',
        'thanks'));
        } ]]>
        </mx:Script>




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   28
DEMO


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   29
Using a Class

  Can be used for programmatic skin
  The following example embeds the
   MyCheckBoxIcon_en_US class in the properties file
        • CHECKBOXSKIN=ClassReference(quot;MyCheckBoxIcon_en_US
              quot;)
  Binding the value of the getClass() method for
   programmatic skins
 <mx:CheckBox selected=quot;truequot;
   selectedUpIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN')}quot;
   selectedDownIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN')
   }quot;
   selectedOverIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN')}
   quot; />


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   30
DEMO


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   31
Changing Locale in Runtime

  To be able to change the locale at run time without using
        resource modules, you compile all the available locales
        into the application at compile time by including them as
        part of the locale option
        •      -locale=en_US,es_ES
  The Flex application uses the list of locales in the
        localeChain property to determine precedence when
        getting values from resource bundles. If a value does not
        exist in the first locale in the list, the Flex application
        looks for that value in the next locale in the list, and so
        on.
        •      localeComboBox.selectedIndex =
              locales.indexOf(resourceManager.localeChain[0]);

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   32
Formatting Date & Times

  DateFormatter and CurrencyFormatter can use
   resources
        THEMECOLOR=0x0000FF
        DATE_FORMAT=MM/DD/YY
        TIME_FORMAT=L:NN A
        CURRENCY_PRECISION=2
        CURRENCY_SYMBOL=$
        THOUSANDS_SEPARATOR=,
        DECIMAL_SEPARATOR=.

        <mx:DateFormatter id=quot;dateFormatterquot;
          formatString=quot;{resourceManager.getString('FormattingValues',
          'DATE_FORMAT')}quot; />


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   33
Styles in Localized Resources

  Binding can be used
        themeColor=quot;{resourceManager.getUint('MyStyles', 'color')}“

  If the value is a color like 0xFF0000, use the
   ResourceManager's getUint() method
  If the value is a class, like a programmatic skin,
   then use the getClass() method




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   34
DEMO


i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   35
Fonts in Localized Resources

  Resource Files
        TEXTSTYLE=myENFont
        TEXTSTYLE=myJAFont
  Application
        <mx:Style>
            @font-face { src: url(quot;ENFont.ttfquot;); fontFamily: EmbeddedENFont; }
            @font-face { src: url(quot;JAFont.ttfquot;); fontFamily: EmbeddedJAFont; }
            .myENFont{ fontFamily: EmbeddedENFont; }
            .myJAFont{ fontFamily: EmbeddedJAFont; }
        </mx:Style>
  In MXML
        <mx:Text styleName=quot;{resourceManager.getString(‘myFontsRB, 'TEXTSTYLE')}quot;/>

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   36
AIR & i18N

  Generating via Flex
        • Flex i18N can be used
  Generating via HTML/JavaScript (Ajax)
        • General techniques which are available in required
          platform can be used
        • Be careful on data transaction such as on JSON etc.
  SQLLite
        • SQLLite database can be used to customize assets and
              literals

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   37
Resources

  Unicode
        http://unicode.org

  Flex 3 Documentations
        http://www.adobe.com/support/documentation/en/flex/
        http://livedocs.adobe.com/flex/3/html/l10n_1.html

  Flex.org
  RBMan
        http://rbman.riaforge.org

  My blog
        http://blog.demirkapi.net

i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   38
Questions & Answers




                                                       Oğuz Demirkapı
                                                                      ?
                                                     http://blog.demirkapi.net
                                                      360Flex@demirkapi.net




i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net   39

Contenu connexe

Similaire à Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application (2 hours)

How To Build And Launch A Successful Globalized App From Day One Or All The ...
How To Build And Launch A Successful Globalized App From Day One  Or All The ...How To Build And Launch A Successful Globalized App From Day One  Or All The ...
How To Build And Launch A Successful Globalized App From Day One Or All The ...agileware
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...adunne
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLars Trieloff
 
Globalizing your web application
Globalizing your web applicationGlobalizing your web application
Globalizing your web applicationChris Saylor
 
Localization of iPhone Apps
Localization of iPhone AppsLocalization of iPhone Apps
Localization of iPhone Appskeywords
 
What is Internationalization & Localization Testing?
What is Internationalization & Localization Testing?What is Internationalization & Localization Testing?
What is Internationalization & Localization Testing?QA InfoTech
 
Alessandro Salvatico - Sviluppare J2EE con INGRES
Alessandro Salvatico - Sviluppare J2EE con INGRESAlessandro Salvatico - Sviluppare J2EE con INGRES
Alessandro Salvatico - Sviluppare J2EE con INGRESBetter Software
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Ivo Jansch
 
Internationalization in Rails 2.2
Internationalization in Rails 2.2Internationalization in Rails 2.2
Internationalization in Rails 2.2Nicolas Jacobeus
 
Globalization Testing for Cloud Products
Globalization Testing for Cloud ProductsGlobalization Testing for Cloud Products
Globalization Testing for Cloud ProductsTechWell
 
Internationalization Basics Webinar Slides
Internationalization Basics Webinar SlidesInternationalization Basics Webinar Slides
Internationalization Basics Webinar SlidesAdam Asnes
 
Between Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative IntroductionBetween Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative Introductionlukhnos
 
Barcelona Multilanguage
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguageguest3a6661
 
090309 Rgam Presentatie Evernote And Tarpipe Final
090309   Rgam   Presentatie Evernote And Tarpipe Final090309   Rgam   Presentatie Evernote And Tarpipe Final
090309 Rgam Presentatie Evernote And Tarpipe Finalgebbetje
 
Presentation eXo Foss Bridge
Presentation eXo Foss BridgePresentation eXo Foss Bridge
Presentation eXo Foss BridgeJeremi Joslin
 

Similaire à Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application (2 hours) (20)

How To Build And Launch A Successful Globalized App From Day One Or All The ...
How To Build And Launch A Successful Globalized App From Day One  Or All The ...How To Build And Launch A Successful Globalized App From Day One  Or All The ...
How To Build And Launch A Successful Globalized App From Day One Or All The ...
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 Applications
 
Globalizing your web application
Globalizing your web applicationGlobalizing your web application
Globalizing your web application
 
ColdBox i18N
ColdBox i18N ColdBox i18N
ColdBox i18N
 
Localization of iPhone Apps
Localization of iPhone AppsLocalization of iPhone Apps
Localization of iPhone Apps
 
What is Internationalization & Localization Testing?
What is Internationalization & Localization Testing?What is Internationalization & Localization Testing?
What is Internationalization & Localization Testing?
 
Alessandro Salvatico - Sviluppare J2EE con INGRES
Alessandro Salvatico - Sviluppare J2EE con INGRESAlessandro Salvatico - Sviluppare J2EE con INGRES
Alessandro Salvatico - Sviluppare J2EE con INGRES
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)
 
Internationalization in Rails 2.2
Internationalization in Rails 2.2Internationalization in Rails 2.2
Internationalization in Rails 2.2
 
Till Vollmer Presentation
Till Vollmer PresentationTill Vollmer Presentation
Till Vollmer Presentation
 
Globalization Testing for Cloud Products
Globalization Testing for Cloud ProductsGlobalization Testing for Cloud Products
Globalization Testing for Cloud Products
 
Internationalization Basics Webinar Slides
Internationalization Basics Webinar SlidesInternationalization Basics Webinar Slides
Internationalization Basics Webinar Slides
 
Yahoo @ Nike
Yahoo @ NikeYahoo @ Nike
Yahoo @ Nike
 
Symfony for non-techies
Symfony for non-techiesSymfony for non-techies
Symfony for non-techies
 
Between Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative IntroductionBetween Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative Introduction
 
Barcelona Multilanguage
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguage
 
Rails i18n
Rails i18nRails i18n
Rails i18n
 
090309 Rgam Presentatie Evernote And Tarpipe Final
090309   Rgam   Presentatie Evernote And Tarpipe Final090309   Rgam   Presentatie Evernote And Tarpipe Final
090309 Rgam Presentatie Evernote And Tarpipe Final
 
Presentation eXo Foss Bridge
Presentation eXo Foss BridgePresentation eXo Foss Bridge
Presentation eXo Foss Bridge
 

Plus de 360|Conferences

Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality360|Conferences
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager360|Conferences
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps360|Conferences
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish360|Conferences
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck360|Conferences
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus360|Conferences
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1360|Conferences
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers360|Conferences
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4360|Conferences
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex360|Conferences
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...360|Conferences
 
Joe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UXJoe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UX360|Conferences
 
Bryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projectsBryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projects360|Conferences
 

Plus de 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
 
Joe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UXJoe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UX
 
Bryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projectsBryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projects
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application (2 hours)

  • 1. 360|Flex Indianapolis, IN Oğuz Demirkapı CTO | NicheClick Media | http://NicheClick.com CREATING OUR FIRST I18N (ÎÑŢÉRÑÄŢÎÖÑÅĻÎŽÅŢÎÖÑ) FLEX APPLICATION
  • 2. About Me • CTO at NicheClick Media • Coding since ‘85, CGI Programming since ’94 • ColdFusion Developer since ’97 (Flex since ‘07) • Adobe Certified Expert • Founder and Manager (prev) of CFUG for Turkey • Manager of Orange County Adobe Developers User Group • Interested in ColdFusion, Flex, AIR, Ajax, Frameworks, i18N, L10N, G11N • Have big interest in Epistemology • Living in Dana Point, CA • Personal blog: http://blog.demirkapi.net i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 2
  • 3. Agenda  What you may expect?  i18N Theory & Basics  Flex & i18N  Resources  Questions & Answers i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 3
  • 4. What You May Expect? Open Your Eyes, if; May be not for you, if;  You are a i18N newbie  You are already using i18N  You heard that you should in Flex in production create i18N applications  You think I know everything  You need to get idea about about i18N implementation i18N usage on Flex   You want to get some tips i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 4
  • 5. Do we need multilingualism?  Yes! i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 5
  • 6. Why i18N (Internationalization)?  English is just another language!  The World Wide Web should be truly world-wide!  Internationalization is important to ensure that users worldwide can equally benefit from Web technology  Wide diversity world-wide: • Scripts (Latin, Cyrillic, Hebrew, Tamil, Katakana,...) • Languages (English, German, Turkish, Korean, Japanese,...) • Typographic conventions • Cultural conventions • Political circumstances  Avoid fragmentation of specifications due to localization  Make sure internationalization is done at the right place i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 6
  • 7. What is …?  What is i18N (Internationalization)?  Application functions in at least two locales  What is L10N (Localization)?  Process of applying a locale or language quot;skinquot; to an i18N application  What is G11N (Globalization)?  i18N & L10N i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 7
  • 8. Globalization & Localization Internationalization Localization  Single character set  Based on globalized  Single executable software  Single install  Adds specific translations and adaptations for  Single server serves all particular languages and clients in all languages markets Globalized software can be localized without any code changes i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 8
  • 9. Character encoding Character encoding specifies mappings from a character set to the integer numbers that represent the characters on a computer.  EUC-JP (Japanese)  EUC-KR (Korean)  ISO-8859-1 (Western European and English)  SHIFT_JIS (Japanese)  UTF-8 (All Languages) i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 9
  • 10. What is Locale?  The combination of a language and a country code en_US: US English (color, $) en_GB: British English (colour, £) de_CH: German in Switzerland tr_TR: Turkish in Turkey i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 10
  • 11. Selecting Locale  Manual • Default locale can be loaded and other options would be available by selection via buttons/selects etc.  Locale Detection • Capabilities.language property in Flash Player and AIR • Parsing ‘Accept-Language’ header on HTTP request  Not usable with URLLoader • Parsing browser and OS language settings via JavaScript • Location detection depending on IP i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 11
  • 12. Problems  Charset Conversions  Collation  Formatting & Parsing ◦ Searching, Sorting, Matching  Date & time  Segmentation  Messages ◦ word, line, …  Numbers & currencies  Transforms ◦ Normalization  Translated Names ◦ Casing  Languages, Regions (Countries), Scripts, Time zones, Currencies ◦ Transliterations  Unicode Regular Expressions  Calendar, Time Zone, Date/Time conversions  Complex-Text Display / Input  … i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 12
  • 13. What is Unicode?  Unicode (unicode.org) is an character set for all the characters and symbols of the world.  Unicode provides a unique number for every character.  Except Klingon!  ‫ما هي الشفرة الموحدة quot;يونِكودquot; ؟‬ Unicode nedir? Τι είναι το Unicode Cos'è Unicode? 유니코드에 대해? Что такое Unicode? i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 13
  • 14. Unicode (cont.)  Why do we need to use Unicode? • Avoids data corruption • Single encoding for text in all languages • Makes software globalization possible  Vastly reduces development cost  Vastly reduces maintenance, update and support cost  Switching to Unicode has no disadvantages for single language users, to the contrary it usually offers advantages even for single language users. And it offers great advantages for multilingual users.  Encoding: Use Unicode wherever possible for content, databases, etc. Always declare the encoding of content. i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 14
  • 15. Unicode (cont.)  Non-Globalized Component • Does not use Unicode • Hard-coded date/time formatting & parsing • Hard-coded number & currency formatting & parsing • Hard-coded collation (sorting/searching/matching) • Other hard-coded operations • Hard-coded literals i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 15
  • 16. Unicode & Files  UTF-8 is the recommended encoding for files.  Use a Unicode capable editor (IDE)  Flex Builder • Default encoding is UTF-8  Eclipse • Default encoding is Cp1252 • Change it into UTF-8  Window-> Preferences -> General -> Workspace  Text file encoding i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 16
  • 17. Unicode & Database  Use a robust database with right settings • MS SQL Server • MySQL Server • PostgreSQL Server • Oracle  Beware of Unicode Support • MySQL 4.1 and up default-character-set=utf8 • MS SQL Server  SQL Server nvarchar, ntext etc. i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 17
  • 18. Flex & i18N  Flex 3 has embedded i18N features  It is possible to create i18N applications in Flex 2 • Using ResourceBundle class • Different approaches such as XML usage etc. i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 18
  • 19. Localization in Flex  Resource Bundles • Idea is based on Java resource bundles technique • Every locale has a localized version of properties files • Creating localized files may need resource bundle managers  Attesoro (attesoro.org)  Eclipse Plug-in (sourceforge.net/projects/eclipse-rbe/)  RBMan (Flex Application) (rbman.riaforge.org) • Binary assets such as audio files, video files, SWF files, and images can be referenced  flag=Embed(quot;images/flag_us.pngquot;)  Every locale needs to create localized properties files i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 19
  • 20. Localization in Flex  Beware that properties files in Flex encoded in UTF8.  You can edit directly with a Unicode capable editor.  Most of the resource bundle editors will have issues with Unicode encoded properties files.  RBMan is the tool to manage all these and embed to your current applications. i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 20
  • 21. DEMO i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 21
  • 22. Localization in Flex - 2  Properties files can be compiled as resource bundles OR  Properties files can be loaded at run time by resource modules i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 22
  • 23. Localization in Flex - 3  Flex lets you change locales on the fly • If you compile more than one resource bundle into an application, you can toggle the resource bundle based on the locale  If you compile resource modules • You can load and unload the SWF files at run time based on the locale • You can create new resource bundles programmatically  If your application supports many locales, you will likely want to load the appropriate resources at run time rather than compile all supported resources into the application at compile time. i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 23
  • 24. Accessing The Values in Resource Bundles  Bind values from the resource to an expression • @Resource directive • Available only in MXML • Cannot change locales at run time • Only returns Strings  Methods of the ResourceManager class • Can be used also in ActionScript • Can return data types other than Strings, such as ints, Booleans, and Numbers (getNumber(), getBoolean()) • Can be used to switch locales at run time • Not supported in Flex Builder or ANT FlexTasks and needs to use command line i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 24
  • 25. Accessing The Values in Resource Bundles  Compiling as Runtime Shared Libraries • Saves re-compiling your bundles every time while compiling the main application  Compiling into Component Modules • Separation of dependencies with the main application  Manually loading into the resourceManager at runtime • Remoting can be used to load the required resources from the server • Have to have a connection to the server retrieve the bundles • Modifiying the resource bundles on the server without having to re-compile / re-deploy the application is possible i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 25
  • 26. Using the @Resource Directive  Sample <mx:FormItem label=quot;@Resource(key=‘username', bundle=‘myRB')quot;> <mx:TextInput/> </mx:FormItem>  Compile Parameters -locale=en_US -allow-source-path-overlap=true -source-path=locale/{locale} i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 26
  • 27. Using the ResourceManager  Using the ResourceManager <mx:Metadata> [ResourceBundle(quot;myRBquot;)] [ResourceBundle(quot;myOtherRBquot;)] </mx:Metadata> i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 27
  • 28. Using the Resource Classes  On an ActionScript <mx:Script><![CDATA[ import mx.resources.ResourceBundle; import mx.controls.Alert; private function registrationComplete():void { Alert.show(resourceManager.getString(‘myRB', 'thanks')); } ]]> </mx:Script> i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 28
  • 29. DEMO i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 29
  • 30. Using a Class  Can be used for programmatic skin  The following example embeds the MyCheckBoxIcon_en_US class in the properties file • CHECKBOXSKIN=ClassReference(quot;MyCheckBoxIcon_en_US quot;)  Binding the value of the getClass() method for programmatic skins <mx:CheckBox selected=quot;truequot; selectedUpIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN')}quot; selectedDownIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN') }quot; selectedOverIcon=quot;{resourceManager.getClass(‘myBundle','CHECKBOXSKIN')} quot; /> i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 30
  • 31. DEMO i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 31
  • 32. Changing Locale in Runtime  To be able to change the locale at run time without using resource modules, you compile all the available locales into the application at compile time by including them as part of the locale option • -locale=en_US,es_ES  The Flex application uses the list of locales in the localeChain property to determine precedence when getting values from resource bundles. If a value does not exist in the first locale in the list, the Flex application looks for that value in the next locale in the list, and so on. • localeComboBox.selectedIndex = locales.indexOf(resourceManager.localeChain[0]); i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 32
  • 33. Formatting Date & Times  DateFormatter and CurrencyFormatter can use resources THEMECOLOR=0x0000FF DATE_FORMAT=MM/DD/YY TIME_FORMAT=L:NN A CURRENCY_PRECISION=2 CURRENCY_SYMBOL=$ THOUSANDS_SEPARATOR=, DECIMAL_SEPARATOR=. <mx:DateFormatter id=quot;dateFormatterquot; formatString=quot;{resourceManager.getString('FormattingValues', 'DATE_FORMAT')}quot; /> i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 33
  • 34. Styles in Localized Resources  Binding can be used themeColor=quot;{resourceManager.getUint('MyStyles', 'color')}“  If the value is a color like 0xFF0000, use the ResourceManager's getUint() method  If the value is a class, like a programmatic skin, then use the getClass() method i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 34
  • 35. DEMO i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 35
  • 36. Fonts in Localized Resources  Resource Files TEXTSTYLE=myENFont TEXTSTYLE=myJAFont  Application <mx:Style> @font-face { src: url(quot;ENFont.ttfquot;); fontFamily: EmbeddedENFont; } @font-face { src: url(quot;JAFont.ttfquot;); fontFamily: EmbeddedJAFont; } .myENFont{ fontFamily: EmbeddedENFont; } .myJAFont{ fontFamily: EmbeddedJAFont; } </mx:Style>  In MXML <mx:Text styleName=quot;{resourceManager.getString(‘myFontsRB, 'TEXTSTYLE')}quot;/> i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 36
  • 37. AIR & i18N  Generating via Flex • Flex i18N can be used  Generating via HTML/JavaScript (Ajax) • General techniques which are available in required platform can be used • Be careful on data transaction such as on JSON etc.  SQLLite • SQLLite database can be used to customize assets and literals i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 37
  • 38. Resources  Unicode http://unicode.org  Flex 3 Documentations http://www.adobe.com/support/documentation/en/flex/ http://livedocs.adobe.com/flex/3/html/l10n_1.html  Flex.org  RBMan http://rbman.riaforge.org  My blog http://blog.demirkapi.net i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 38
  • 39. Questions & Answers Oğuz Demirkapı ? http://blog.demirkapi.net 360Flex@demirkapi.net i18N (Internationalization) in Flex Applications | Oğuz Demirkapı | http://blog.demirkapi.net 39