ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

lang.core.ru.js
Go to the documentation of this file.
1 var ultimix = {};
2
8 if( !ultimix.lang )
9 {
10 ultimix.lang = {};
11 }
12
18 ultimix.lang.Locale = 'ru';
19
25 ultimix.lang.Strings = new Object();
26
32 ultimix.lang.Strings[ ultimix.lang.Locale ] = new Object();
33
47 ultimix.get_string = function( StringAlias , Default , Value )
48 {
49 if( !Value )
50 {
51 Value = 'default';
52 }
53
54 if( ultimix.lang.Strings[ ultimix.lang.Locale ] )
55 {
56 if( ultimix.lang.Strings[ ultimix.lang.Locale ][ StringAlias ] )
57 {
58 if( Value == 'default' )
59 {
60 return( ultimix.lang.Strings[ ultimix.lang.Locale ][ StringAlias ][ 'default' ] );
61 }
62 else
63 {
64 for( Condition in ultimix.lang.Strings[ ultimix.lang.Locale ][ StringAlias ] )
65 {
66 if( ( new RegExp( Condition ) ).test( String( Value ) ) )
67 {
68 return( ultimix.lang.Strings[ ultimix.lang.Locale ][ StringAlias ][ Condition ] );
69 }
70 }
71 }
72 }
73 }
74 if( Default )
75 {
76 return( Default );
77 }
78 return( StringAlias );
79 }