meeting-room-booking-system / mrbs-code

MRBS application code
Other
127 stars 63 forks source link

Auto detect language #2871

Open jberanek opened 4 years ago

jberanek commented 4 years ago

Hi there,

I am having problem with the auto-detect browser lang in ver 1.9, I have 1.8 in Production and works fine with the detection of browser lang but it just doesn't work on my newly installed 1.9 on my development environment. Any idea ? I didn't put anything in the config.inc.php and checked the settings on systemdefaults.inc.php for

$disable_automatic_language_changing = false;

// Set this to a different language specifier to default to different // language tokens. This must equate to a lang.* file in MRBS. // e.g. use "fr" to use the translations in "lang.fr" as the default // translations. [NOTE: it is only necessary to change this if you // have disabled automatic language changing above] $default_language_tokens = "en";

which is the same as my 1.8 in PROD

Thanks James

Reported by: *anonymous

Original Ticket: mrbs/support-requests/2178

jberanek commented 4 years ago

Some questions:

  1. What OS is your server running - Windows or Unix?
  2. What have you got $override_locale set to, if anything?
  3. What are your browser language preferences (shown on the Help page)?
  4. What language is MRBS displaying?
  5. What PHP extensions are installed (shown on the Help page when logged in as an admin)?
  6. Are you getting any error messages if you set $debug = true; in your config file?

Original comment by: campbell-m

jberanek commented 4 years ago
  1. Windows 10 using xamp (both dev and prod are the same environment)

  2. never use $override_locale

  3. About MRBS Meeting Room Booking System MRBS 1.9.0 Your browser is set with the following language preference order: zh-TW, zh, en-US, en

  4. all English

  5. About MRBS Configuration details MRBS version MRBS 1.9.0 Database schema version 66 Database local schema version 1 $auth['type'] db $auth['session'] php Server details Database MySQL 10.4.11-MariaDB System Windows NT OCTOPUS 10.0 build 19041 (Windows 10) AMD64 Server time 2020/9/22 下午 05:31:10 Server software Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.3 PHP 7.4.3 Extensions Core, PDO, Phar, Reflection, SPL, SimpleXML, apache2handler, bcmath, bz2, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, readline, session, sqlsrv, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib Your browser is set with the following language preference order: zh-TW, zh, en-US, en

  6. No error at all

Original comment by: *anonymous

jberanek commented 4 years ago

Are the dates appearing in Chinese?

Original comment by: campbell-m

jberanek commented 4 years ago

Yes

Original comment by: *anonymous

Attachments: https://sourceforge.net/p/mrbs/support-requests/_discuss/thread/76cfb3c976/bc81/attachment/lang.png

jberanek commented 4 years ago

OK, thanks. I can reproduce this problem and I will work on a solution. (I think it's caused by a bug in PHP, so I will have to find a way round it.)

Original comment by: campbell-m

jberanek commented 4 years ago

thanks and will wait for your update. James

Original comment by: *anonymous

jberanek commented 4 years ago

I have now (2541a2) fixed this in the default branch. You should upgrade to the latest code in the default branch which you can get by following the Download Snapshot link on this page.

Original comment by: campbell-m

jberanek commented 4 years ago

It works and thank you very much.

Original comment by: *anonymous