added support to name the languages

added remaining flags i have from the famfamfam set and renamed them to country names
This commit is contained in:
Matthew Vale
2015-11-17 16:01:03 +00:00
parent b53999069c
commit e66b2f831a
249 changed files with 30 additions and 10 deletions

18
core/app_languages.php Normal file
View 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'] = "العربية - مصر";
?>

View File

@@ -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;
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

BIN
themes/flags/Albania.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
themes/flags/Algeria.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

BIN
themes/flags/Andorra.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
themes/flags/Angola.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

BIN
themes/flags/Anguilla.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

BIN
themes/flags/Argentina.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

BIN
themes/flags/Armenia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

BIN
themes/flags/Aruba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

BIN
themes/flags/Australia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
themes/flags/Austria.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

BIN
themes/flags/Azerbaijan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
themes/flags/Bahamas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

BIN
themes/flags/Bahrain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

BIN
themes/flags/Bangladesh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
themes/flags/Barbados.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

BIN
themes/flags/Belarus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

BIN
themes/flags/Belgium.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

BIN
themes/flags/Belize.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
themes/flags/Benin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

BIN
themes/flags/Bermuda.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

BIN
themes/flags/Bhutan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

BIN
themes/flags/Botswana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

BIN
themes/flags/Brazil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

BIN
themes/flags/Bulgaria.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

BIN
themes/flags/Burundi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

BIN
themes/flags/Cabo Verde.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
themes/flags/Cambodia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

BIN
themes/flags/Cameroon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

BIN
themes/flags/Canada.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

BIN
themes/flags/Chad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

BIN
themes/flags/Chile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

BIN
themes/flags/China.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

BIN
themes/flags/Colombia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

BIN
themes/flags/Comoros.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
themes/flags/Congo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

BIN
themes/flags/Costa Rica.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

BIN
themes/flags/Croatia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

BIN
themes/flags/Cuba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

BIN
themes/flags/Cyprus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

BIN
themes/flags/Denmark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

BIN
themes/flags/Djibouti.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
themes/flags/Dominica.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
themes/flags/Ecuador.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

BIN
themes/flags/Egypt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
themes/flags/Eritrea.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
themes/flags/Estonia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
themes/flags/Ethiopia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

BIN
themes/flags/Fiji.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

BIN
themes/flags/Finland.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

BIN
themes/flags/France.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

BIN
themes/flags/Gabon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

BIN
themes/flags/Gambia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
themes/flags/Georgia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
themes/flags/Germany.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
themes/flags/Ghana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

BIN
themes/flags/Gibraltar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

BIN
themes/flags/Greece.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

BIN
themes/flags/Greenland.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

BIN
themes/flags/Grenada.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

BIN
themes/flags/Guadeloupe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

BIN
themes/flags/Guam.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

BIN
themes/flags/Guatemala.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
themes/flags/Guinea.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

BIN
themes/flags/Guyana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
themes/flags/Haiti.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
themes/flags/Holy See.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

BIN
themes/flags/Honduras.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
themes/flags/Hong Kong.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

BIN
themes/flags/Hungary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
themes/flags/Iceland.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Some files were not shown because too many files have changed in this diff Show More