| Conditions | 4 |
| Paths | 4 |
| Total Lines | 27 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php namespace Datium\Tools; |
||
| 38 | public static function setConfig( $language ) { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Fetch translated file to config attribute |
||
| 42 | */ |
||
| 43 | self::$config = include('src/CalendarSettings/Jalali.php'); |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Fetch translated expression to langTable attribute |
||
| 47 | */ |
||
| 48 | self::$langTable = include('lang/' . $language . '/general.php'); |
||
| 49 | |||
| 50 | foreach( self::$langTable as $key => $translate ){ |
||
| 51 | |||
| 52 | if ( isset( self::$config[ $key ] ) ) { |
||
| 53 | |||
| 54 | if ( self::$config[ $key ] ) { |
||
| 55 | |||
| 56 | self::$config[ $key ] = $translate; |
||
| 57 | |||
| 58 | } |
||
| 59 | |||
| 60 | } |
||
| 61 | |||
| 62 | } |
||
| 63 | |||
| 64 | } |
||
| 65 | |||
| 73 |