Merge remote-tracking branch 'remotes/fusionpbx/master' into Install_Rewrite
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
// Fill in the value in the native language
|
||||
// rename the corerct flag in /theme/flags/*.png
|
||||
|
||||
$language_name['en-us'] = "English - United States";
|
||||
$language_name['es-cl'] = "Español - Chile";
|
||||
$language_name['pt-pt'] = "Português - Portugal";
|
||||
$language_name['fr-fr'] = "Français - France";
|
||||
$language_name['nl-nl'] = "Nederlands - De Nederland";
|
||||
$language_name['pt-br'] = "Brasileiro - Português";
|
||||
$language_name['pl'] = "Polski - Polska";
|
||||
$language_name['sv-se'] = "Svenska - Sverige";
|
||||
$language_name['uk'] = "Українська - Україна";
|
||||
$language_name['de-at'] = "Deutsch - Österreich";
|
||||
$language_name['ar-eg'] = "العربية - مصر";
|
||||
|
||||
?>
|
||||
|
|
@ -1,19 +1,16 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Get the text for the correct translation
|
||||
*
|
||||
* @method array get
|
||||
*/
|
||||
class text {
|
||||
|
||||
/**
|
||||
* Called when the object is created
|
||||
*/
|
||||
public function __construct() {
|
||||
//place holder
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
|
|
@ -23,13 +20,14 @@ class text {
|
|||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific item from the cache
|
||||
* @var string $language_code examples: en-us, es-cl, fr-fr, pt-pt
|
||||
* @var string $app_path examples: app/exec or core/domains
|
||||
*/
|
||||
public function get($language_code = null, $app_path = null) {
|
||||
//get the global app_languages.php
|
||||
include $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/core/app_languages.php";
|
||||
//get the app_languages.php
|
||||
if ($app_path != null) {
|
||||
include $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/".$app_path."/app_languages.php";
|
||||
|
|
@ -37,7 +35,6 @@ class text {
|
|||
else {
|
||||
include getcwd().'/app_languages.php';
|
||||
}
|
||||
|
||||
//get the available languages
|
||||
krsort($text);
|
||||
foreach ($text as $lang_label => $lang_codes) {
|
||||
|
|
@ -48,24 +45,32 @@ class text {
|
|||
}
|
||||
}
|
||||
$_SESSION['app']['languages'] = array_unique($app_languages);
|
||||
|
||||
//check the session language
|
||||
if(isset($_SESSION['domain'])){
|
||||
$language_code = $_SESSION['domain']['language']['code'];
|
||||
}elseif($language_code == null){
|
||||
$language_code = 'en-us';
|
||||
}
|
||||
//reduce to specific language
|
||||
if ($language_code != 'all') {
|
||||
foreach($text as $key => $value) {
|
||||
if ($language_code == null) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
else {
|
||||
$text[$key] = $value[$language_code];
|
||||
$text[$key] = $value[$language_code];
|
||||
}
|
||||
}
|
||||
if ($language_code != 'all') {
|
||||
foreach($language_name as $code => $value) {
|
||||
$text["language-$code"] = $value;
|
||||
}
|
||||
}else{
|
||||
foreach($language_name as $code => $value) {
|
||||
foreach($language_name as $c_code => $value) {
|
||||
$text["language-$code"][$c_code] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//return the array of translations
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
After Width: | Height: | Size: 604 B |
|
After Width: | Height: | Size: 663 B |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 647 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 428 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 589 B |
|
After Width: | Height: | Size: 526 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 504 B |
|
After Width: | Height: | Size: 585 B |
|
After Width: | Height: | Size: 514 B |
|
After Width: | Height: | Size: 449 B |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 611 B |
|
After Width: | Height: | Size: 631 B |
|
After Width: | Height: | Size: 500 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 512 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 658 B |
|
After Width: | Height: | Size: 639 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 675 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 549 B |
|
After Width: | Height: | Size: 525 B |
|
After Width: | Height: | Size: 628 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 614 B |
|
After Width: | Height: | Size: 570 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 472 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 521 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 428 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 495 B |
|
After Width: | Height: | Size: 572 B |
|
After Width: | Height: | Size: 620 B |
|
After Width: | Height: | Size: 508 B |
|
After Width: | Height: | Size: 500 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 501 B |
|
After Width: | Height: | Size: 537 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 489 B |
|
After Width: | Height: | Size: 545 B |
|
After Width: | Height: | Size: 545 B |
|
After Width: | Height: | Size: 498 B |
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 489 B |
|
After Width: | Height: | Size: 493 B |
|
After Width: | Height: | Size: 594 B |
|
After Width: | Height: | Size: 545 B |
|
After Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 487 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 488 B |
|
After Width: | Height: | Size: 509 B |
|
After Width: | Height: | Size: 493 B |
|
After Width: | Height: | Size: 516 B |
|
After Width: | Height: | Size: 480 B |
|
After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 487 B |
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 553 B |
|
After Width: | Height: | Size: 537 B |
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 532 B |