salut,
j'ai un gros souci avec flex, je veux bien localizer mon application c a d que mon interface change de langue à chaque fois qu'on change le langue système.
pour le français ça marche mais pour l'anglais non.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" backgroundGradientColors="[0x000000,0x323232]" viewSourceURL="srcview/index.html" creation complete="changeHandler(event)"> <!-- Before compiling this application on your system: 1. Add the following compiler arguments: -locale=en_US,fr_FR -source-path=locale/{locale} 2. Open a Command prompt/shell, navigate to the bin directory of your Flex SDK (for example: C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.1\bin), and execute the following command: copylocale en_US fr_FR --> <mx:Metadata> [ResourceBundle("myResources")] </mx:Metadata> <mx:Style> Label { color: #FFFFFF; } </mx:Style> <mx:Script> <![CDATA[ [Bindable] private function changeHandler(event:Event):void { resourceManager.localeChain = [ flash.system.Capabilities.language.valueOf() ]; trace(flash.system.Capabilities.language.valueOf()); } ]]> </mx:Script> <mx:HBox width="100%" horizontalAlign="right"> <mx:Image source="{resourceManager.getClass('myResources', 'LOGO')}"/> <mx:Spacer width="100%"/> </mx:HBox> <ContactForm/> </mx:Application>
merci d'avance
Partager