The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i18n language menu manager
#10
Hey guys,

Great plugin. I just finish to modify it with :
  • no heading
  • a little flag

In the file page, create a folder called "flag" and copy images of flags you need. Files must be named as code country et png format.
For instance : en.pgn ; fr.png and so on.

edit file : i18n_lang_menu.php
Into the function get_i18n_lang_menu comment original line and add this :

PHP Code:
function get_i18n_lang_menu(){
 
   //load config
 
   $config=get_config();
 
   
    
//hook for <li> class
 
   $langs_arr=return_i18n_languages();
 
   $current_language=$langs_arr[0];
 
   
    foreach
($config->languages->children() as $lang){
 
       #echo '<li  '.($lang->code==$current_language?'class="'.$config->class.'"':'').' ><a href="'.htmlspecialchars(return_i18n_setlang_url($lang->code)).'">'.$lang->text.'</a></li>';
 
       echo '<li style="list-style-type: none;" '.($lang->code==$current_language?'class="'.$config->class.'"':'').' ><a href="'.htmlspecialchars(return_i18n_setlang_url($lang->code)).'"> <img src="data/uploads/flag/'.$lang->code.'.png" /></a></li>';
 
   }


I juste add a CSS style to mask li heading and replace $lang->text with image call. As you can see, you can use another folder to store your flag pictures.
Reply


Messages In This Thread
i18n language menu manager - by Zorato - 2012-03-06, 09:25:56
RE: i18n language menu manager - by phpman - 2013-07-05, 00:24:31
RE: i18n language menu manager - by Zorato - 2013-07-05, 01:13:25
RE: i18n language menu manager - by cybertaf - 2016-10-04, 18:10:09
RE: i18n language menu manager - by bokor.pavol - 2019-03-25, 23:29:39
RE: i18n language menu manager - by Cre8gent - 2019-11-16, 20:54:57
RE: i18n language menu manager - by smdp-1971 - 2019-11-17, 22:44:20
RE: i18n language menu manager - by ufopera - 2019-11-17, 02:06:59
RE: i18n language menu manager - by Cre8gent - 2019-11-21, 19:56:39
RE: i18n language menu manager - by smdp-1971 - 2019-11-21, 23:32:34
RE: i18n language menu manager - by Cre8gent - 2019-11-22, 00:15:46
RE: i18n language menu manager - by smdp-1971 - 2019-11-22, 19:50:21
i18n language menu manager - by mvlcek - 2012-03-06, 17:19:19
i18n language menu manager - by rfuller - 2012-03-31, 02:43:55
i18n language menu manager - by Zorato - 2012-04-02, 04:47:03
i18n language menu manager - by protrade - 2012-05-06, 19:58:25
i18n language menu manager - by mvlcek - 2012-05-06, 21:02:55
i18n language menu manager - by protrade - 2012-05-06, 21:14:46



Users browsing this thread: 4 Guest(s)