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