flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Martin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-17210) mx:NumberFormatter failed when use localeChain
Date Thu, 28 May 2015 16:41:18 GMT

    [ https://issues.apache.org/jira/browse/FLEX-17210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563217#comment-14563217
] 

Chris Martin commented on FLEX-17210:
-------------------------------------

The spark formatter wraps the flash.globalization package in the flash player. So it actually
leverages the globalization info from the OS [1]. This is why it works even thought we didn't
compile in the resources for that language. So really the local is only missing if it's not
available in the OS.

The mx formatter requires the locale resource to be compiled into the swf. It is not aware
of the flash.globalization package in the flash player.

I think the mx Formatters are working as they should in requiring the locale info to be compiled
in. Someone may chose to use those if they want more consistency in how things look for a
certain language across various operating systems [2].





[1] http://blogs.adobe.com/globalization/2011/03/03/the-differences-of-three-globalization-packages-in-flash-platform/
[2] http://blogs.adobe.com/JudyGao/2011/04/26/difference-between-mx-formatters-and-spark-formatters/

> mx:NumberFormatter failed when use localeChain
> ----------------------------------------------
>
>                 Key: FLEX-17210
>                 URL: https://issues.apache.org/jira/browse/FLEX-17210
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Formatters
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): Windows
> Affected OS(s): 
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Justin Mclean
>              Labels: easytest
>
>       Steps to reproduce:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="onCC();">
> 	<mx:Script>
> 		<![CDATA[
> 			import mx.formatters.NumberFormatter;
> 		
> 			private function onCC():void
> 			{
> 				var nf:NumberFormatter = new NumberFormatter();
> 				nf.precision = 2;
> 				resourceManager.localeChain = ['zh-Hans'];				
> 				trace("number:"+nf.format(1/3));        
> 				resourceManager.localeChain = ['en_US'];
> 				trace("number:"+nf.format(1/3));        
> 			}
> 		]]
>       >
> 	</mx:Script>
> </mx:WindowedApplication>
>  
>  Actual Results:
>  
> number:
> number:0.33
>  
>  Expected Results:
>  
> number:0.33
> number:0.33
>  
>  Workaround (if any):
>     



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message