added support to name the languages
added remaining flags i have from the famfamfam set and renamed them to country names
18
core/app_languages.php
Normal file
@@ -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,7 +20,6 @@ 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
|
||||
@@ -39,7 +35,6 @@ class text {
|
||||
else {
|
||||
include getcwd().'/app_languages.php';
|
||||
}
|
||||
|
||||
//get the available languages
|
||||
krsort($text);
|
||||
foreach ($text as $lang_label => $lang_codes) {
|
||||
@@ -50,7 +45,6 @@ class text {
|
||||
}
|
||||
}
|
||||
$_SESSION['app']['languages'] = array_unique($app_languages);
|
||||
|
||||
//check the session language
|
||||
if(isset($_SESSION['domain'])){
|
||||
$language_code = $_SESSION['domain']['language']['code'];
|
||||
@@ -63,12 +57,20 @@ class text {
|
||||
$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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
BIN
themes/flags/Afghanistan.png
Normal file
|
After Width: | Height: | Size: 604 B |
BIN
themes/flags/Aland Islands.png
Normal file
|
After Width: | Height: | Size: 663 B |
BIN
themes/flags/Albania.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
themes/flags/Algeria.png
Normal file
|
After Width: | Height: | Size: 582 B |
BIN
themes/flags/American Samoa.png
Normal file
|
After Width: | Height: | Size: 647 B |
BIN
themes/flags/Andorra.png
Normal file
|
After Width: | Height: | Size: 643 B |
BIN
themes/flags/Angola.png
Normal file
|
After Width: | Height: | Size: 428 B |
BIN
themes/flags/Anguilla.png
Normal file
|
After Width: | Height: | Size: 643 B |
BIN
themes/flags/Antigua and Barbuda.png
Normal file
|
After Width: | Height: | Size: 591 B |
BIN
themes/flags/Argentina.png
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
themes/flags/Armenia.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
themes/flags/Aruba.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
themes/flags/Australia.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
themes/flags/Austria.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
themes/flags/Azerbaijan.png
Normal file
|
After Width: | Height: | Size: 589 B |
BIN
themes/flags/Bahamas.png
Normal file
|
After Width: | Height: | Size: 526 B |
BIN
themes/flags/Bahrain.png
Normal file
|
After Width: | Height: | Size: 457 B |
BIN
themes/flags/Bangladesh.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
themes/flags/Barbados.png
Normal file
|
After Width: | Height: | Size: 585 B |
BIN
themes/flags/Belarus.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
themes/flags/Belgium.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
themes/flags/Belize.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
themes/flags/Benin.png
Normal file
|
After Width: | Height: | Size: 486 B |
BIN
themes/flags/Bermuda.png
Normal file
|
After Width: | Height: | Size: 611 B |
BIN
themes/flags/Bhutan.png
Normal file
|
After Width: | Height: | Size: 631 B |
BIN
themes/flags/Bolivia, Plurinational State of.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
themes/flags/Bosnia and Herzegovina.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
themes/flags/Botswana.png
Normal file
|
After Width: | Height: | Size: 443 B |
BIN
themes/flags/Bouvet Island.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
themes/flags/Brazil.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
themes/flags/British Indian Ocean Territory.png
Normal file
|
After Width: | Height: | Size: 658 B |
BIN
themes/flags/Brunei Darussalam.png
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
themes/flags/Bulgaria.png
Normal file
|
After Width: | Height: | Size: 462 B |
BIN
themes/flags/Burkina Faso.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
themes/flags/Burundi.png
Normal file
|
After Width: | Height: | Size: 675 B |
BIN
themes/flags/Cabo Verde.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
themes/flags/Cambodia.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
themes/flags/Cameroon.png
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
themes/flags/Canada.png
Normal file
|
After Width: | Height: | Size: 628 B |
BIN
themes/flags/Cayman Islands.png
Normal file
|
After Width: | Height: | Size: 643 B |
BIN
themes/flags/Central African Republic.png
Normal file
|
After Width: | Height: | Size: 614 B |
BIN
themes/flags/Chad.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
themes/flags/Chile.png
Normal file
|
After Width: | Height: | Size: 450 B |
BIN
themes/flags/China.png
Normal file
|
After Width: | Height: | Size: 472 B |
BIN
themes/flags/Christmas Island.png
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
themes/flags/Cocos (Keeling) Islands.png
Normal file
|
After Width: | Height: | Size: 625 B |
BIN
themes/flags/Colombia.png
Normal file
|
After Width: | Height: | Size: 483 B |
BIN
themes/flags/Comoros.png
Normal file
|
After Width: | Height: | Size: 577 B |
BIN
themes/flags/Congo, the Democratic Republic of the.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
themes/flags/Congo.png
Normal file
|
After Width: | Height: | Size: 521 B |
BIN
themes/flags/Cook Islands.png
Normal file
|
After Width: | Height: | Size: 586 B |
BIN
themes/flags/Costa Rica.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
themes/flags/Cote d'Ivoire.png
Normal file
|
After Width: | Height: | Size: 453 B |
BIN
themes/flags/Croatia.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
themes/flags/Cuba.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
themes/flags/Cyprus.png
Normal file
|
After Width: | Height: | Size: 428 B |
BIN
themes/flags/Czech Republic.png
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
themes/flags/Denmark.png
Normal file
|
After Width: | Height: | Size: 495 B |
BIN
themes/flags/Djibouti.png
Normal file
|
After Width: | Height: | Size: 572 B |
BIN
themes/flags/Dominica.png
Normal file
|
After Width: | Height: | Size: 620 B |
BIN
themes/flags/Dominican Republic.png
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
themes/flags/Ecuador.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
themes/flags/Egypt.png
Normal file
|
After Width: | Height: | Size: 465 B |
BIN
themes/flags/El Salvador.png
Normal file
|
After Width: | Height: | Size: 501 B |
BIN
themes/flags/Equatorial Guinea.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
themes/flags/Eritrea.png
Normal file
|
After Width: | Height: | Size: 653 B |
BIN
themes/flags/Estonia.png
Normal file
|
After Width: | Height: | Size: 429 B |
BIN
themes/flags/Ethiopia.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
themes/flags/Falkland Islands (Malvinas).png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
themes/flags/Faroe Islands.png
Normal file
|
After Width: | Height: | Size: 474 B |
BIN
themes/flags/Fiji.png
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
themes/flags/Finland.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
themes/flags/France.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
themes/flags/French Guiana.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
themes/flags/French Polynesia.png
Normal file
|
After Width: | Height: | Size: 498 B |
BIN
themes/flags/French Southern Territories.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
themes/flags/Gabon.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
themes/flags/Gambia.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
themes/flags/Georgia.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
themes/flags/Germany.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
themes/flags/Ghana.png
Normal file
|
After Width: | Height: | Size: 490 B |
BIN
themes/flags/Gibraltar.png
Normal file
|
After Width: | Height: | Size: 463 B |
BIN
themes/flags/Greece.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
themes/flags/Greenland.png
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
themes/flags/Grenada.png
Normal file
|
After Width: | Height: | Size: 637 B |
BIN
themes/flags/Guadeloupe.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
themes/flags/Guam.png
Normal file
|
After Width: | Height: | Size: 509 B |
BIN
themes/flags/Guatemala.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
themes/flags/Guinea-Bissau.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
themes/flags/Guinea.png
Normal file
|
After Width: | Height: | Size: 480 B |
BIN
themes/flags/Guyana.png
Normal file
|
After Width: | Height: | Size: 645 B |
BIN
themes/flags/Haiti.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
themes/flags/Heard Island and McDonald Islands.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
themes/flags/Holy See.png
Normal file
|
After Width: | Height: | Size: 553 B |
BIN
themes/flags/Honduras.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
themes/flags/Hong Kong.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
themes/flags/Hungary.png
Normal file
|
After Width: | Height: | Size: 432 B |
BIN
themes/flags/Iceland.png
Normal file
|
After Width: | Height: | Size: 532 B |