| @@ 40-49 (lines=10) @@ | ||
| 37 | * |
|
| 38 | * @return array |
|
| 39 | */ |
|
| 40 | public static function toLanguages() |
|
| 41 | { |
|
| 42 | $locales = []; |
|
| 43 | $translations = DB_Translation::distinct()->select('to_lang')->get(); |
|
| 44 | foreach ($translations as $object) { |
|
| 45 | array_push($locales, $object->to_lang); |
|
| 46 | } |
|
| 47 | ||
| 48 | return $locales; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Get the languages from translations has been translated. |
|
| @@ 56-65 (lines=10) @@ | ||
| 53 | * |
|
| 54 | * @return array |
|
| 55 | */ |
|
| 56 | public static function fromLanguages() |
|
| 57 | { |
|
| 58 | $locales = []; |
|
| 59 | $translations = DB_Translation::distinct()->select('from_lang')->get(); |
|
| 60 | foreach ($translations as $object) { |
|
| 61 | array_push($locales, $object->from_lang); |
|
| 62 | } |
|
| 63 | ||
| 64 | return $locales; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Get all the available languages. |
|