Please select To the mobile version | Continue to access the desktop computer version
| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 12297|Reply: 8
Collapse the left

How to enable/disable Multilingual feature in Discuz!X ML

[Copy link]

 Russia

Post time: 2012-02-02 11:13
| Show all posts |Read mode
Starting from X2ML#317, you can Enable/Disable the language switcher in your Discuz!X ML.

If the language switcher is disabled, the engine will looks like single-lingual!

For disable the language switcher in your X/ML
just set your default language in your config_global.php:
$_config['output']['language'] = 'en'; // Set your default language here (ar,de,en,fr,ru,th,tr,vn.zh,tc,...)

and add/edit the next row in your config_global.php:
$_config['enable_multilingual'] = false;        // Enable/Disable multi-lingual feature


For enable Multilingual feature in your !X ML,
just set the "enable_multilingual" setting to true or "1" in your config_global.php.

$_config['enable_multilingual'] = true;        // Enable/Disable multi-lingual feature

 United States

Post time: 2012-05-10 03:16
| Show all posts
Thank you very much Vot~~~ I'll try this later
Post time: 2012-07-03 22:29
| Show all posts
本帖最後由 woaicode25 於 2012-7-3 23:32 編輯

How to enable the language switcher

also where i should add the Language Switcher
Post time: 2012-07-06 11:46
| Show all posts
  1. $_config['enable_multilingual'] = true;        // Enable/Disable multi-lingual feature
Copy the Code

Switcher will add automatically to header.
Post time: 2012-07-26 04:33
| Show all posts
$_config['output']['language'] = 'en';
// ----------------------  CONFIG DETECT_LANGUAGE  ---------------------- //
$_config['detect_language'] = 0;
// --------------------  CONFIG ENABLE_MULTILINGUAL  -------------------- //
$_config['enable_multilingual'] = 1;



i edit it like this now ,defult is en,but visiter can swtich self

 Russia

 Author| Post time: 2012-07-26 07:41
| Show all posts
visiter can swtich self

It is right, because of you have ENABLED to select the language for users:
$_config['enable_multilingual'] = 1;

If you want to DISABLE the language switcher, just set this setting to 0.

 Hong Kong

Post time: 2013-07-23 11:58
| Show all posts
vot 2012-7-26 08:41
It is right, because of you have ENABLED to select the language for users:
$_config['enable_multili ...

Dear Sir,
I can't find the enable/disable Multilingual statment from config_global.php. Please advise, thanks.

<?php
$_config = array();
// ----------------------------  CONFIG DB  ----------------------------- //
$_config['db']['1']['dbhost'] = 'localhost';
$_config['db']['1']['dbuser'] = 'root';
$_config['db']['1']['dbpw'] = '';
$_config['db']['1']['dbcharset'] = 'utf8';
$_config['db']['1']['pconnect'] = '0';
$_config['db']['1']['dbname'] = 'discuz';
$_config['db']['1']['tablepre'] = 'pre_';
$_config['db']['common']['slave_except_table'] = '';
// --------------------------  CONFIG MEMORY  --------------------------- //
$_config['memory']['prefix'] = 'TbWSCJ_';
$_config['memory']['eaccelerator'] = 1;
$_config['memory']['apc'] = 1;
$_config['memory']['xcache'] = 1;
$_config['memory']['memcache']['server'] = '';
$_config['memory']['memcache']['port'] = 11211;
$_config['memory']['memcache']['pconnect'] = 1;
$_config['memory']['memcache']['timeout'] = 1;
// --------------------------  CONFIG SERVER  --------------------------- //
$_config['server']['id'] = 1;
// -------------------------  CONFIG DOWNLOAD  -------------------------- //
$_config['download']['readmod'] = 2;
$_config['download']['xsendfile']['type'] = '0';
$_config['download']['xsendfile']['dir'] = '/down/';
// ---------------------------  CONFIG CACHE  --------------------------- //
$_config['cache']['type'] = 'sql';
// --------------------------  CONFIG OUTPUT  --------------------------- //
$_config['output']['charset'] = 'utf-8';
$_config['output']['forceheader'] = 1;
$_config['output']['gzip'] = '0';
$_config['output']['tplrefresh'] = 1;
$_config['output']['language'] = 'en';
$_config['output']['staticurl'] = 'static/';
$_config['output']['ajaxvalidate'] = '0';
$_config['output']['iecompatible'] = '0';
// --------------------------  CONFIG COOKIE  --------------------------- //
$_config['cookie']['cookiepre'] = 'dt4d_';
$_config['cookie']['cookiedomain'] = '';
$_config['cookie']['cookiepath'] = '/';
// -------------------------  CONFIG SECURITY  -------------------------- //
$_config['security']['authkey'] = 'eecbaeHpdvPSgxlD';
$_config['security']['urlxssdefend'] = 1;
$_config['security']['attackevasive'] = '0';
$_config['security']['querysafe']['status'] = 1;
$_config['security']['querysafe']['dfunction']['0'] = 'load_file';
$_config['security']['querysafe']['dfunction']['1'] = 'hex';
$_config['security']['querysafe']['dfunction']['2'] = 'substring';
$_config['security']['querysafe']['dfunction']['3'] = 'if';
$_config['security']['querysafe']['dfunction']['4'] = 'ord';
$_config['security']['querysafe']['dfunction']['5'] = 'char';
$_config['security']['querysafe']['daction']['0'] = 'intooutfile';
$_config['security']['querysafe']['daction']['1'] = 'intodumpfile';
$_config['security']['querysafe']['daction']['2'] = 'unionselect';
$_config['security']['querysafe']['daction']['3'] = '(select';
$_config['security']['querysafe']['daction']['4'] = 'unionall';
$_config['security']['querysafe']['daction']['5'] = 'uniondistinct';
$_config['security']['querysafe']['dnote']['0'] = '/*';
$_config['security']['querysafe']['dnote']['1'] = '*/';
$_config['security']['querysafe']['dnote']['2'] = '#';
$_config['security']['querysafe']['dnote']['3'] = '--';
$_config['security']['querysafe']['dnote']['4'] = '"';
$_config['security']['querysafe']['dlikehex'] = 1;
$_config['security']['querysafe']['afullnote'] = '0';
// --------------------------  CONFIG ADMINCP  -------------------------- //
// -------- Founders: $_config['admincp']['founder'] = '1,2,3'; --------- //
$_config['admincp']['founder'] = '1';
$_config['admincp']['forcesecques'] = '0';
$_config['admincp']['checkip'] = 1;
$_config['admincp']['runquery'] = 1;
$_config['admincp']['dbimport'] = 1;
// --------------------------  CONFIG REMOTE  --------------------------- //
$_config['remote']['on'] = '0';
$_config['remote']['dir'] = 'remote';
$_config['remote']['appkey'] = '62cf0b3c3e6a4c9468e7216839721d8e';
$_config['remote']['cron'] = '0';
// -------------------------  CONFIG LANGUAGES  ------------------------- //
$_config['languages']['en']['icon'] = 'en.gif';
$_config['languages']['en']['title'] = 'English';
$_config['languages']['en']['dir'] = 'ltr';
// -------------------  THE END  -------------------- //
?>
Post time: 2013-07-23 12:02
| Show all posts
Your config is not....... full?

This is EXAMPLE config (for preview)

  1. <?php


  2. $_config = array();

  3. // ----------------------------  CONFIG DB  ----------------------------- //
  4. $_config['db']['1']['dbhost'] = 'localhost';
  5. $_config['db']['1']['dbuser'] = 'DBUSERNAME';
  6. $_config['db']['1']['dbpw'] = 'DBPASSWORD';
  7. $_config['db']['1']['dbcharset'] = 'utf8';
  8. $_config['db']['1']['pconnect'] = '0';
  9. $_config['db']['1']['dbname'] = 'DBNAME';
  10. $_config['db']['1']['tablepre'] = 'pre_';
  11. $_config['db']['slave'] = '';
  12. $_config['db']['common']['slave_except_table'] = '';

  13. // --------------------------  CONFIG MEMORY  --------------------------- //
  14. $_config['memory']['prefix'] = 'GMxUOu_';
  15. $_config['memory']['redis']['server'] = '';
  16. $_config['memory']['redis']['port'] = 6379;
  17. $_config['memory']['redis']['pconnect'] = 1;
  18. $_config['memory']['redis']['timeout'] = '0';
  19. $_config['memory']['redis']['requirepass'] = '';
  20. $_config['memory']['redis']['serializer'] = 1;
  21. $_config['memory']['memcache']['server'] = '';
  22. $_config['memory']['memcache']['port'] = 11211;
  23. $_config['memory']['memcache']['pconnect'] = 1;
  24. $_config['memory']['memcache']['timeout'] = 1;
  25. $_config['memory']['apc'] = 1;
  26. $_config['memory']['xcache'] = 1;
  27. $_config['memory']['eaccelerator'] = 1;
  28. $_config['memory']['wincache'] = 1;

  29. // --------------------------  CONFIG SERVER  --------------------------- //
  30. $_config['server']['id'] = 1;

  31. // -------------------------  CONFIG DOWNLOAD  -------------------------- //
  32. $_config['download']['readmod'] = 2;
  33. $_config['download']['xsendfile']['type'] = '0';
  34. $_config['download']['xsendfile']['dir'] = '/down/';

  35. // ---------------------------  CONFIG CACHE  --------------------------- //
  36. $_config['cache']['type'] = 'file';

  37. // --------------------------  CONFIG OUTPUT  --------------------------- //
  38. $_config['output']['charset'] = 'utf-8';
  39. $_config['output']['forceheader'] = 1;
  40. $_config['output']['gzip'] = '0';
  41. $_config['output']['tplrefresh'] = 1;
  42. $_config['output']['language'] = 'en';
  43. $_config['output']['staticurl'] = 'static/';
  44. $_config['output']['ajaxvalidate'] = '0';
  45. $_config['output']['iecompatible'] = '0';

  46. // --------------------------  CONFIG COOKIE  --------------------------- //
  47. $_config['cookie']['cookiepre'] = 'E7cL_';
  48. $_config['cookie']['cookiedomain'] = '';
  49. $_config['cookie']['cookiepath'] = '/';

  50. // -------------------------  CONFIG SECURITY  -------------------------- //
  51. $_config['security']['authkey'] = '73cf33GrRgtZOp4U';
  52. $_config['security']['urlxssdefend'] = 1;
  53. $_config['security']['attackevasive'] = '0';
  54. $_config['security']['querysafe']['status'] = 1;
  55. $_config['security']['querysafe']['dfunction']['0'] = 'load_file';
  56. $_config['security']['querysafe']['dfunction']['1'] = 'hex';
  57. $_config['security']['querysafe']['dfunction']['2'] = 'substring';
  58. $_config['security']['querysafe']['dfunction']['3'] = 'if';
  59. $_config['security']['querysafe']['dfunction']['4'] = 'ord';
  60. $_config['security']['querysafe']['dfunction']['5'] = 'char';
  61. $_config['security']['querysafe']['daction']['0'] = '@';
  62. $_config['security']['querysafe']['daction']['1'] = 'intooutfile';
  63. $_config['security']['querysafe']['daction']['2'] = 'intodumpfile';
  64. $_config['security']['querysafe']['daction']['3'] = 'unionselect';
  65. $_config['security']['querysafe']['daction']['4'] = '(select';
  66. $_config['security']['querysafe']['daction']['5'] = 'unionall';
  67. $_config['security']['querysafe']['daction']['6'] = 'uniondistinct';
  68. $_config['security']['querysafe']['dnote']['0'] = '/*';
  69. $_config['security']['querysafe']['dnote']['1'] = '*/';
  70. $_config['security']['querysafe']['dnote']['2'] = '#';
  71. $_config['security']['querysafe']['dnote']['3'] = '--';
  72. $_config['security']['querysafe']['dnote']['4'] = '"';
  73. $_config['security']['querysafe']['dlikehex'] = 1;
  74. $_config['security']['querysafe']['afullnote'] = '0';

  75. // --------------------------  CONFIG ADMINCP  -------------------------- //
  76. // -------- Founders: $_config['admincp']['founder'] = '1,2,3'; --------- //
  77. $_config['admincp']['founder'] = '1';
  78. $_config['admincp']['forcesecques'] = '0';
  79. $_config['admincp']['checkip'] = 1;
  80. $_config['admincp']['runquery'] = '0';
  81. $_config['admincp']['dbimport'] = 1;

  82. // --------------------------  CONFIG REMOTE  --------------------------- //
  83. $_config['remote']['on'] = '0';
  84. $_config['remote']['dir'] = 'remote';
  85. $_config['remote']['appkey'] = '62cf0b3c3e6a4c9468e7216839721d8e';
  86. $_config['remote']['cron'] = '0';

  87. // ---------------------------  CONFIG INPUT  --------------------------- //
  88. $_config['input']['compatible'] = 1;

  89. // -------------------------  CONFIG LANGUAGES  ------------------------- //
  90. $_config['languages']['ar']['icon'] = 'ar.gif';
  91. $_config['languages']['ar']['name'] = 'العربية';
  92. $_config['languages']['ar']['title'] = 'Arabic';
  93. $_config['languages']['ar']['dir'] = 'rtl';
  94. $_config['languages']['ar']['code'] = 'ar-AE';
  95. $_config['languages']['de']['icon'] = 'de.gif';
  96. $_config['languages']['de']['name'] = 'Deutsch';
  97. $_config['languages']['de']['title'] = 'German';
  98. $_config['languages']['de']['dir'] = 'ltr';
  99. $_config['languages']['de']['code'] = 'de-DE';
  100. $_config['languages']['en']['icon'] = 'en.gif';
  101. $_config['languages']['en']['name'] = 'English';
  102. $_config['languages']['en']['title'] = 'English';
  103. $_config['languages']['en']['dir'] = 'ltr';
  104. $_config['languages']['en']['code'] = 'en-GB';
  105. $_config['languages']['es']['icon'] = 'es.gif';
  106. $_config['languages']['es']['name'] = 'Español';
  107. $_config['languages']['es']['title'] = 'Spanish';
  108. $_config['languages']['es']['dir'] = 'ltr';
  109. $_config['languages']['es']['code'] = 'es-ES';
  110. $_config['languages']['fr']['icon'] = 'fr.gif';
  111. $_config['languages']['fr']['name'] = 'Français';
  112. $_config['languages']['fr']['title'] = 'French';
  113. $_config['languages']['fr']['dir'] = 'ltr';
  114. $_config['languages']['fr']['code'] = 'fr-FR';
  115. $_config['languages']['kr']['icon'] = 'kr.gif';
  116. $_config['languages']['kr']['name'] = 'í•śęµ­ě–´';
  117. $_config['languages']['kr']['title'] = 'Korean';
  118. $_config['languages']['kr']['dir'] = 'ltr';
  119. $_config['languages']['kr']['code'] = 'ko-KO';
  120. $_config['languages']['pl']['icon'] = 'pl.gif';
  121. $_config['languages']['pl']['name'] = 'Polski';
  122. $_config['languages']['pl']['title'] = 'Polish';
  123. $_config['languages']['pl']['dir'] = 'ltr';
  124. $_config['languages']['pl']['code'] = 'pl-PL';
  125. $_config['languages']['ru']['icon'] = 'ru.gif';
  126. $_config['languages']['ru']['name'] = 'Русский';
  127. $_config['languages']['ru']['title'] = 'Russian';
  128. $_config['languages']['ru']['dir'] = 'ltr';
  129. $_config['languages']['ru']['code'] = 'ru-RU';
  130. $_config['languages']['sc']['icon'] = 'zh.gif';
  131. $_config['languages']['sc']['name'] = '简体中文';
  132. $_config['languages']['sc']['title'] = 'Simplified Chinese';
  133. $_config['languages']['sc']['dir'] = 'ltr';
  134. $_config['languages']['sc']['code'] = 'zh-CN';
  135. $_config['languages']['tc']['icon'] = 'tw.gif';
  136. $_config['languages']['tc']['name'] = '繁體中文';
  137. $_config['languages']['tc']['title'] = 'Traditional Chinese';
  138. $_config['languages']['tc']['dir'] = 'ltr';
  139. $_config['languages']['tc']['code'] = 'zh-TW';
  140. $_config['languages']['th']['icon'] = 'th.gif';
  141. $_config['languages']['th']['name'] = 'ภาษาไทย';
  142. $_config['languages']['th']['title'] = 'Thai';
  143. $_config['languages']['th']['dir'] = 'ltr';
  144. $_config['languages']['th']['code'] = 'th-TH';
  145. $_config['languages']['tr']['icon'] = 'tr.gif';
  146. $_config['languages']['tr']['name'] = 'Türkçe';
  147. $_config['languages']['tr']['title'] = 'Turkish';
  148. $_config['languages']['tr']['dir'] = 'ltr';
  149. $_config['languages']['tr']['code'] = 'tr-TR';
  150. $_config['languages']['vn']['icon'] = 'vn.gif';
  151. $_config['languages']['vn']['name'] = 'Tiếng Việt';
  152. $_config['languages']['vn']['title'] = 'Vietnamese';
  153. $_config['languages']['vn']['dir'] = 'ltr';
  154. $_config['languages']['vn']['code'] = 'vi-VN';

  155. // ----------------------  CONFIG DETECT_LANGUAGE  ---------------------- //
  156. $_config['detect_language'] = 1;

  157. // --------------------  CONFIG ENABLE_MULTILINGUAL  -------------------- //
  158. $_config['enable_multilingual'] = 1;


  159. // -------------------  THE END  -------------------- //

  160. ?>
Copy the Code

 Hong Kong

Post time: 2013-07-23 12:07
| Show all posts
kaaleth 2013-7-23 13:02
Your config is not....... full?

This is EXAMPLE config (for preview)

Dear Sir,

Thank you very much!
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-12-14 18:36 GMT+3 , Processed in 0.093297 sec., 12 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list