| [ Index ] | PHP Cross Reference of Mambo 4.6.5 |
|
| [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Mambo 4 * @subpackage Languages 5 * @author Mambo Foundation Inc see README.php 6 * @copyright (C) 2000 - 2009 Mambo Foundation Inc. 7 * See COPYRIGHT.php for copyright notices and details. 8 * @license GNU/GPL Version 2, see LICENSE.php 9 * 10 * Redistributions of files must retain the above copyright notice. 11 * 12 * Mambo is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; version 2 of the License. 15 */ 16 17 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?> 18 <?php global $mosConfig_charset, $mosConfig_locale;?> 19 <script type="text/javascript"> 20 function submitbutton(pressbutton) { 21 var form = document.adminForm; 22 if(pressbutton == 'remove') { 23 if(getSelectedRadio('adminForm','lang') == "en") { 24 alert( "<?php echo T_('You cannot delete English.') ?>" ); 25 } else { 26 var defaultlang=document.adminForm.defaultlang.value; 27 var mylang = document.adminForm.lang; 28 var candelete=true; 29 for(i=0;i<mylang.length;i++) { 30 if(mylang[i].checked && mylang[i].value==defaultlang) { 31 candelete=false; 32 alert( "<?php echo T_('You cannot delete default language.') ?>" ); 33 break; 34 } 35 } 36 if(candelete) 37 submitform( pressbutton ); 38 } 39 } else if (pressbutton == 'translate'){ 40 if(charsets[getSelectedRadio('adminForm','lang')]!='<?php echo $mosConfig_charset; ?>') 41 { 42 alert('<?php echo sprintf(T_('You can translate only languages in %s. to translate a language in another encoding please make it as default first.'),$mosConfig_charset)?>'); 43 }else{ 44 submitform( pressbutton ); 45 } 46 }else{ 47 submitform( pressbutton ); 48 } 49 } 50 </script> 51 52 53 <table class="adminlist" id="lang_table" cellpadding="3" cellspacing="0" width="80%"> 54 <thead> 55 <tr> 56 <th style="width:10px"> </th> 57 <th><?php echo T_('Language') ?></th> 58 <th><?php echo T_('Country - Region') ?></th> 59 <th><?php echo T_('Default') ?></th> 60 <th><?php echo T_('Character Set') ?></th> 61 <th><?php echo T_('Version') ?></th> 62 <th><?php echo T_('Date') ?></th> 63 </tr> 64 </thead> 65 <tbody> 66 <?php for ($i=0, $n=count( $rows ); $i < $n; $i++) : $row = $rows[$i];?> 67 <tr id="<?php echo $i;?>"> 68 <td style="width:10px"> 69 <input type="radio" id="cb<?php echo $i;?>" name="lang" value="<?php echo $row->name; ?>" onClick="isChecked(this.checked);" /> 70 </td> 71 <td> 72 <a href="#" onclick="hideMainMenu();return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->title; ?></a> 73 </td> 74 <td> 75 <?php echo $row->territory ?> 76 </td> 77 <td> 78 <?php $default = (mamboCore::get('mosConfig_locale') == $row->name) ? 1 : 0; ?> 79 <a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','default')"> 80 <img src="images/<?php echo ( $default ) ? 'tick.png' : 'publish_x.png';?>" width="12" height="12" border="0" alt="<?php echo ( $default ) ? T_('Yes') : T_('No');?>" /> 81 </a> 82 </td> 83 <td> 84 <?php echo $row->charset; $languageCharsets[$row->name] = $row->charset; ?> 85 </td> 86 <td> 87 <?php echo $row->version; ?> 88 </td> 89 <td> 90 <?php echo $row->creationdate; ?> 91 </td> 92 </tr> 93 <?php endfor; ?> 94 </tbody> 95 </table> 96 <input type="hidden" name="defaultlang" value="<?php echo $mosConfig_locale;?>" /> 97 <script type="text/javascript"> 98 table = new Table('lang_table'); 99 table.makeSortable(1,"null,str,null,str,str,date"); 100 charsets = new Array(); 101 <?php 102 foreach($languageCharsets as $language => $charset){ 103 echo "charsets['$language'] = '$charset';\n"; 104 } 105 ?> 106 </script>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 8 00:05:01 2012 | Cross-referenced by PHPXref 0.7 |
| Mambo API: Mambo is Free software released under the GNU/General Public License, Version 2 |