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 1121 build_postbit
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 1121 build_postbit
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 861 postParser->parse_message
/showthread.php 1121 build_postbit
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 1121 build_postbit
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 1121 build_postbit
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 861 postParser->parse_message
/showthread.php 1121 build_postbit
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 1121 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
QUESTION Change date
#1
Hi,

Furder:
Try to find the condition to get the current language


PHP Code:
<?php 
if ($LANG == 'de') {
 echo 'lang is DE';
 ?>


But not good...
Reply
#2
(2015-09-28, 16:53:42)Frens Wrote: Hi,

Furder:
Try to find the condition to get the current language



PHP Code:
<?php 
if ($LANG == 'de') {
 echo 'lang is DE';
 ?>


But not good...


If you use the I18N plugin, you should test for $language == 'de'
If you use standard GS language handling, you should test for a language code in this format: language_region; for example: en_US, in your case $LANG == 'de_DE'... for a full list, check out the answers in this link
Reply
#3
Hi,

Thanks for help

i use I18N My standard language is dutch nl_NL

if i do
PHP Code:
<?php 
if ($LANG == 'de_DE') {
 echo 
'lang is DE';
 } 
?>

Nothing show

If i do


PHP Code:
<?php if ($LANG ==  'nl_NL') {
echo 
'lang is  NL';
?>


It show everywhere  'lang is  NL'  uniform which language I choose.

for the moment i got the language var from my header.inc.php

Code:
global $language;
Reply
#4
Ok I will quote myself: 
Quote:If you use the I18N plugin, you should test for $language == 'de'

You use the I18n plugin, so as I said before you should do this: 
PHP Code:
<?php if ($language == 'nl') {
  echo 'lang is  NL';
} ?>
Reply
#5
(2015-10-05, 02:36:01)Tyblitz Wrote: Ok I will quote myself: 

Quote:If you use the I18N plugin, you should test for $language == 'de'

You use the I18n plugin, so as I said before you should do this: 

PHP Code:
<?php if ($language == 'nl') {
  echo 'lang is  NL';
} ?>

Thanks for the moment its works now.
Reply




Users browsing this thread: 1 Guest(s)