Mantis Logo
Mantis Manual
Manual
Configuration

Database
Path
Webserver
Version
Email
Language
Display
Time
JpGraph
Date
News
Default Preferences
Summary
Bugnote
File Upload
HTML
Authentication
Status Settings
Filters
Misc
Colors
Cookies
Database Tables
Speed Optimisation
Reminders
Bug History
Sponsorship
Source Control Integration
Custom Fields
My View Settings
Relationships
System Logging


Partner Links


Language
Last Modified: August 13, 2004 09:08AM
(Any)
Description

$g_default_language This is the language used by default in Mantis.

As of 0.19.0, this may be set to 'auto' where Mantis will try to determine the language from the browser.
$g_language_choices_arr This is to be set to an array of languages that are available for users to choose from. The default value includes all languages supported by Mantis. The administrator can limit the languages available for users to choose from by overriding this value. For example, to support English, French and German include the following code:

 array( 'english', 'french', 'german' ); 

Of course, administrators can also add their own languages by translating the strings and creating their own language files. You are encouraged to share any translation work that you do with the Mantis team. This will ensure that the newly created language file is maintained with future Mantis releases.

All language files reside in the lang/ folder. They are all named according to the following pattern: strings_<language>.txt.
$g_fallback_language This is the language used if Mantis cannot determine the language from the browser. It defaults to 'english'.

As of 0.19.0, this may be set to 'auto' where Mantis will try to determine the language from the browser.
If a string does not exist in the active language, the English string is used instead.

User Contributed Notes
Language
Add Notes About Notes
nardimatias@hotmail.com
05-Apr-2004 17:49
#103
How install spanish language?
bonoyqa@yahoo.com.cn
15-Jul-2004 6:24
#172
Chinese Translation
http://www.bonoy.com/a/index.php?name=PNphpBB2&file=viewtopic&t=174

------------------------------
Bonoy QA http://www.bonoy.com/
tarcmello@hotmail.com
20-Aug-2004 12:41
#189
I change the language for portuguese_brazil but only the login page was tranlated ? What's hapenning ?

Thanks !
rma@sapo.pt
30-Aug-2004 9:06
#193
it happens the same to me when choosing portuguese_standard, only login page shows the correct language everything else changes back to engels
pashev.igor@pomorsu.ru
21-Oct-2004 7:28
#238
Fast solution.

In file "core/lang_api.php"
change string
function lang_get( $p_string, $p_lang = null ) {

to looks like this
function lang_get( $p_string, $p_lang = 'russian_koi8' ) {
pashev.igor@pomorsu.ru
21-Oct-2004 7:48
#239
GO TO PREFERENCES !
After login!
beidl@tcsoft.net
30-Oct-2004 13:09
#251
I'm using version 0.19.0
When I add the following line

$g_default_language = 'auto';

to the config_inc.php´, mantis crashes with following errors:

Warning: lang_load(): Unable to access /myhost/bugtracker/lang/strings_auto.txt in /myhost/bugtracker/core/lang_api.php on line 37

Warning: lang_load /myhost/bugtracker/lang/strings_auto.txt): failed to open stream: No such file or directory in /myhost/bugtracker/core/lang_api.php on line 37

Fatal error: lang_load(): Failed opening required /myhost/bugtracker/lang/strings_auto.txt' (include_path='.:/usr/share/php') in /myhost/bugtracker/core/lang_api.php on line 37
shashas@centras.lt
22-Mar-2005 10:49
#386
I'm now working using lithuanian language. But when i add notes instead lithuanian charecters i see "?" or similar. What i need to change more so i can start using Mantis at full in lithuanian langauge?
shashas@centras.lt
23-Mar-2005 2:22
#388
i found the solution, i needed not just to change mysql tables character sets but also evry table's text columns character sets to cp1257. Now evrithing in lithuanian and i can type lithuanian characters :)
ronrodel@yahoo.com
18-May-2005 4:06
#437
hi>>
  why is it my files(Visual basic,my documents, my computer icon)i cannot open tthe file<<

when i turn on my pc i got a message "Language File Failed" whats that mean<< hope for ur immediate (help)response>>thnks>>


ronn
river@exatel.co.kr
07-Jun-2005 23:11
#458
How install korea language?
vagir@vagir.ru
12-Jul-2005 4:12
#515
2beidl@tcsoft.net:
---
>I'm using version 0.19.0
>When I add the following line

>$g_default_language = 'auto';

>to the config_inc.php´, mantis crashes with following errors:

>Warning: lang_load(): Unable to >access /myhost/bugtracker/lang/strings_auto.txt >in /myhost/bugtracker/core/lang_api.php on line 37
---

Don't use file config_defaults_inc.php from newer version with ver.0.19!
xingshihai@www.dftl-hz.com
30-Sep-2005 4:35
#626
i set default language is auto. when it use english, i report bug in chinese. it can not display chinese correctly. But when change language to chese in my account and input chinese, it can display correctly.
how to display chinese or japanese when language is english?
thanks
boujin@gmail.com
11-Oct-2005 22:46
#642
Similar to the question on Chinese above, I partially got around the issue of Japanese and English by doing editing the config_defaults_inc.php and adding a new strings file. I wanted to allow some of our users to view Mantis in Japanese and others to view it with an English interface. Similar to the problem above, the Japanese was breaking up when viewing in English mode, but looked fine when I viewed it under a Japanese interface. So I decided to go with UTF-8. All of the Japanese users select "japanese_utf8" from the language menu and all English users select my newly created "utf8" from the language menu. (This should probably be "english_utf8".

To get this to work:

1)
I first created a new strings file in the /lang/ directory. I copied the existing strings_english.txt to strings_utf8.txt. In the file I only made one change, I changed:

$s_charset = 'windows-1252'; --> $s_charset = 'utf-8';

2)
Then I added the UTF-8 option to the language pulldown menu by editing the config_defaults_inc.php file. I added "'utf-8'" to the $g_language_choices_arr array.

$g_language_choices_arr = array(
                'auto',
                'chinese_simplified',
                'chinese_traditional',
                'chinese_traditional_utf8',
                ...
                'turkish',
                'ukrainian',
                'utf-8'

Now my Japanese clients can see the Japanese input just fine and the English clients can see the Japanese just fine.

I have found one problem and that's the carriage returns at the end of the line. Right now a '\r' is being displayed at the end of every Japanese line. I'm not really too concerned about this, but it would be nice to fix sometime.

I'm also assuming that you have a version of MySQL (or whatever DB you are using) that can handle UTF-8 data. As far as I know, this is either 4.1 or higher.

I'm no Mantis guru, which is probably evident from my hack here, so if others have a better solution than this one, please advise!
softgear@naver.com
16-Feb-2006 6:59
#898
To use "korean_utf8",
Add 'korean_utf8' into $g_language_choices_arr = array( ) in config_defaults_inc.php file. It was missed.
url@spdop.ru
12-May-2006 11:41
#1066
Russian language do not "inserting" in the database, before language is not set to UTF-8 charset.
If you step on this problem, like me, look to my solution.
OS: FreeBSD 6.1-RELEASE
PHP: 5.1.2
MySQL: 5.1.6

Install iconv package or other that can convert charsets program.
My example for iconv and sed package.
1. sed "s/KOI8-R/UTF-8" lang/strings_russian_koi8r.txt > lang/utf8.txt (also you can made this change by hands, just edit this file and change KOI8-R to UTF-8)
2. iconv -f KOI8-R -t UTF-8 lang/utf8.txt > lang/strings_russian_utf8.txt
3. Edit core/lang_api.php. In listing of function "lang_get" change like this one:
function lang_get( $p_string, $p_lang = 'russian_utf8')

Btw, it's can be russian default setting for universality, imho.
wangsheng108@hotmail.com
16-May-2006 2:32
#1068
I don't know if this was a error of language.When I open the firstpage 'index.php',I see nothing.And the result is the same if I open the login.php or the other.But the install of php is no problem.A sample of PHP file can be show well.Please help me,Thanks.
konst (a) nt (dot) ru
19-May-2006 6:06
#1078
To make Russian language really work I had to change all column types in MySQL database to utf8_general_ci (I had used win1251 as default character set when creating database, but it does not work correctly).
The second problem remains: if one user uses Russian language in prefs, and another prefer english - the second one could not read or edit text in russian.
I think the Mantis have to exchange with database ONLY in UTF-8 and convert it to user's language on the fly. How to setup this?
konst (a) nt (dot) ru
19-May-2006 6:24
#1079
YES! I've got the trick!!!!
1) create (or convert) your database to use UTF-8 for all string fields
2) copy all nesessary lang/strings_xxx.txt to lang/strings_xxx_utf8.txt
3) change in lang/strings_xxx_utf8.txt value of $s_charset to 'UTF-8'
4) may be you have to convert your file with ICONV, as described url@spdop.ru in item 2
Now all users who use xxx_utf8 as the language in the prefs will see the same text in the fields.
I think the Mantis developers have to change the default language to english_UTF8.
jin.hua@pbc-pts.com
19-Jul-2006 21:58
#1196
Help!I see clobber when i search request by the create custom field,which is created in Chinese_simplified.How can i settle this problem?Thanks a lot.
a.nawrocki@drago.pl
22-Aug-2006 6:05
#1242
SYSTEM WARNING: htmlspecialchars(): charset `iso-8859-2' not supported, assuming iso-8859-1

What to do?
I use Polish language. (i changed the name of strings_english and copied file strings_polish

Where I have to write $g_language_choices_arr = 'polish' ?
a.nawrocki@drago.pl
22-Aug-2006 6:08
#1243
SYSTEM WARNING: htmlspecialchars(): charset `iso-8859-2' not supported, assuming iso-8859-1

What to do?
I use Polish language. (i changed the name of strings_english and copied file strings_polish

Where I have to write $g_language_choices_arr = 'polish' ?
marekk(a)simtel_pl
29-Aug-2006 2:37
#1251
I've converted file strings_polish.txt into utf-8, works fine.
gtorres1@nycap.rr.com
30-Dec-2006 18:55
#1326
I need help to put english language back to my pc
Add Notes About Notes
Last updated: Fri, 16 May 2008 - 13:15:56

Mantis @ SourceForge