Commit 36f4372 1 parent 532140d commit 36f4372 Copy full SHA for 36f4372
File tree 2 files changed +15
-4
lines changed
core/src/avm2/globals/flash/system
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,11 @@ package flash.system {
8
8
public native static function get screenResolutionY(): Number ;
9
9
public native static function get pixelAspectRatio(): Number ;
10
10
public native static function get screenDPI(): Number ;
11
+ public native static function get language(): String ;
11
12
public static function get manufacturer (): String {
12
13
stub_getter("flash.system.Capabilities" , "manufacturer" );
13
14
return "Adobe Windows"
14
15
}
15
- public static function get language (): String {
16
- stub_getter("flash.system.Capabilities" , "language" );
17
- return "en"
18
- }
19
16
public static function get isDebugger (): Boolean {
20
17
return false
21
18
}
Original file line number Diff line number Diff line change @@ -113,3 +113,17 @@ pub fn get_screen_dpi<'gc>(
113
113
// source: https://tracker.adobe.com/#/view/FP-3949775
114
114
Ok ( 72 . into ( ) )
115
115
}
116
+
117
+ /// Implements `flash.system.Capabilities.language`
118
+ pub fn get_language < ' gc > (
119
+ activation : & mut Activation < ' _ , ' gc > ,
120
+ _this : Value < ' gc > ,
121
+ _args : & [ Value < ' gc > ] ,
122
+ ) -> Result < Value < ' gc > , Error < ' gc > > {
123
+ let language = activation
124
+ . context
125
+ . system
126
+ . language
127
+ . get_language_code ( activation. context . player_version ) ;
128
+ Ok ( AvmString :: new_utf8 ( activation. gc ( ) , language) . into ( ) )
129
+ }
You can’t perform that action at this time.
0 commit comments