For those who want VBulletin to run with multiple languages and UTF-8
Forum Moderators:
I have seen a lot of questions about encoding problems, phrases cut-off UTF-8 and multiple languages. I have had most of these problems myself. The following worked for me. I am not sure where to post this so I have posted it here. If this is not correct then I appologize. If so, please move the topic to
the appropriate forum.
My forum is still in development but I have managed to install VBulletin and use multiple languages. The VBulleting Database I use now is UTF-8
All Languages function perfectly and no problems with encoding OR phrases geting cut-off. All imported data from old forum (multilanguage & UTF-8) display perfectly.
Keep in mind that you may not need to follow the complete procedure. Maybe some steps can be skipped because you already have the same situation. Maybe you dont want to install all over again and only want to try some sections..Just use what works for you.
The following pprocedure worked for me. You could give it a try..Just make sure you BACKUP all your files and databases first. I can not be held responsible for any data losses. MAKE A BACKUP! Furthermore: I can not guaranty support but will do the best I can. I would appreciate it if you let me know if you followed these steps and if it worked for you aswell. (or maybe not)
Additional information:
- I use VBulleting 3.6.8 patchlevel 2
- MySQL 5.0.45-community-log
- PHP Version 5.2.5
The procedure involves the following steps:
- STEP 1: setting up your VBulleting Database as UTF-8
- STEP 2: Editing config.php
- STEP 3: Editing ImpExConfig.php (if you are going to import data)
- STEP 4: Editing Php.ini
- STEP 5: Installing VBulletin
- STEP 6: Tweaking encoding settings.
- STEP 7: Changing the character set for the default language.
- STEP 8: Converting other language XML files to UTF-8 (very easy)
- STEP 9: Installing other languages.
- STEP 10: Importing data from previous forums.
========================================================
STEP 1
- Create the database for your vbulletin.
- In phpMyAdmin set the collation for your newly created vbulletin DB to utf8_bin
STEP 2
- Open /includes/config.php
- Configure your db settings etc as normal
- uncomment this line of code: // $config['Mysqli']['charset'] = 'utf8'; (remove the //)
- Save the file and upload to your server.
STEP 3
- This step can be skipped if you do not need to import data from old forum
- Open ImpExConfig.php
- Configure your DB settings as normal. I have included information your SOURCE and TARGET databases.
- Find the following code:
- Chage the code to this:
STEP 4
Open your PHP.ini file
I have Multibyte Support ENABLED and the following settings are in place:
Just change "mbstring.language = Dutch" to match your own.
Upload your PHP.ini file accordingly. i.e If you use PHP5 (FastCGI) you only need to edit 1 file. If you don't then you need to copy your php.ini file to every directory that may need it! (or just copy it to all your directories)
STEP 5
- Now install vbulletin as normal.
- Do not import data when you finish the install! (only if you are going to use impex for a import)
- Do not install any other languages at this time..
[just a minor detail I forgot to mention]
- When you are ready installing VBulletin open phpMyAdmin and go to your VBulletin DB and change the charset for usernames!
- table: vbul_user
- fiels: username (Change only the collation for this field)
- Collation: utf8_unicode_ci
- If you do not set this to utf8_unicode_ci and keep it utf8_bin then all usernames (logins) are CaseSensitive!!
- When you change it to utf8_unicode_ci logins are NOT CaseSensitive
STEP 6
I have also set the options mentioned in thread : http://www.vbulletin.com/forum/showthread.php?t=259250
- Also try emptying the blank character stripper:
Admin CP -> vBulletin Options -> Censorship Options -> Blank Character Stripper
- Also try emptying the blank character stripper:
Admin CP -> vBulletin Options -> Censorship Options -> Blank Character Stripper
- Also, the "prevent shouting" feature can cause problems for some non-English languages. Try disabling it:
Admin CP -> vBulletin Options -> Message Posting and Editing Options -> Prevent 'SHOUTING'
- Furthermore. Check ALL other vbulletin setting that have to do with forum/thread/post display
Check the title max. char. setting, post max. char settings etc..Make sure they are the same as on your old forum which you are going to import
STEP 7
- Make sure your HTML charset is set corectly:
Admin CP -> Languages & Phrases -> Language Manager -> [Edit Settings] -> HTML Character Set
- Set it for the default language to UTF-8
STEP 8
- Download any language file you want to use.
- Unzip it to some directory.
- Now open the XML file with any unicode editor that is capable of saving to UTF-8 without BOM (Byte Order Mark)
I Use foxe225 beta (http://www.firstobject.com/dn_editor.htm)
- The top part of the file needs to be edited. I used the turkish language file.
- Find the following code:
- Change it to:
If you open the file with foxe225 you can change the encoding to UTF-8 and it will automatically adjust the first line in your XML:
<?xml version="1.0" encoding="ISO-8859-1"?> to <?xml version="1.0" encoding="UTF-8"?>
Now SAVE the file in UTF-8. and you are done.
STEP 9
- Now it's time to import/install other language files
- Check to make sure encoding for all other imported languages are set to UTF-8
STEP 10
Import your data from your old forum. (See the manual.)
Forum Moderators:
I have seen a lot of questions about encoding problems, phrases cut-off UTF-8 and multiple languages. I have had most of these problems myself. The following worked for me. I am not sure where to post this so I have posted it here. If this is not correct then I appologize. If so, please move the topic to
the appropriate forum.
My forum is still in development but I have managed to install VBulletin and use multiple languages. The VBulleting Database I use now is UTF-8
All Languages function perfectly and no problems with encoding OR phrases geting cut-off. All imported data from old forum (multilanguage & UTF-8) display perfectly.
Keep in mind that you may not need to follow the complete procedure. Maybe some steps can be skipped because you already have the same situation. Maybe you dont want to install all over again and only want to try some sections..Just use what works for you.
The following pprocedure worked for me. You could give it a try..Just make sure you BACKUP all your files and databases first. I can not be held responsible for any data losses. MAKE A BACKUP! Furthermore: I can not guaranty support but will do the best I can. I would appreciate it if you let me know if you followed these steps and if it worked for you aswell. (or maybe not)
Additional information:
- I use VBulleting 3.6.8 patchlevel 2
- MySQL 5.0.45-community-log
- PHP Version 5.2.5
The procedure involves the following steps:
- STEP 1: setting up your VBulleting Database as UTF-8
- STEP 2: Editing config.php
- STEP 3: Editing ImpExConfig.php (if you are going to import data)
- STEP 4: Editing Php.ini
- STEP 5: Installing VBulletin
- STEP 6: Tweaking encoding settings.
- STEP 7: Changing the character set for the default language.
- STEP 8: Converting other language XML files to UTF-8 (very easy)
- STEP 9: Installing other languages.
- STEP 10: Importing data from previous forums.
========================================================
STEP 1
- Create the database for your vbulletin.
- In phpMyAdmin set the collation for your newly created vbulletin DB to utf8_bin
STEP 2
- Open /includes/config.php
- Configure your db settings etc as normal
- uncomment this line of code: // $config['Mysqli']['charset'] = 'utf8'; (remove the //)
- Save the file and upload to your server.
STEP 3
- This step can be skipped if you do not need to import data from old forum
- Open ImpExConfig.php
- Configure your DB settings as normal. I have included information your SOURCE and TARGET databases.
- Find the following code:
Code:
// Advanced Target $impexconfig['target']['databasetype'] = 'mysql'; // currently mysql only $impexconfig['target']['charset'] = ''; $impexconfig['target']['persistent'] = false; // (true/false) use mysql_pconnect // Advanced Source $impexconfig['source']['charset'] = ''; $impexconfig['source']['persistent'] = false;
Code:
// Advanced Target $impexconfig['target']['databasetype'] = 'mysql'; // currently mysql only $impexconfig['target']['charset'] = 'utf8'; $impexconfig['target']['persistent'] = true; // (true/false) use mysql_pconnect // Advanced Source $impexconfig['source']['charset'] = 'utf8'; $impexconfig['source']['persistent'] = true; - Save the file and upload to your server.
STEP 4
Open your PHP.ini file
I have Multibyte Support ENABLED and the following settings are in place:
Code:
mbstring.language = Dutch mbstring.internal_encoding = UTF-8 mbstring.http_input = UTF-8 mbstring.http_output = UTF-8 mbstring.encoding_translation = On mbstring.detect_order = UTF-8
Upload your PHP.ini file accordingly. i.e If you use PHP5 (FastCGI) you only need to edit 1 file. If you don't then you need to copy your php.ini file to every directory that may need it! (or just copy it to all your directories)
STEP 5
- Now install vbulletin as normal.
- Do not import data when you finish the install! (only if you are going to use impex for a import)
- Do not install any other languages at this time..
[just a minor detail I forgot to mention]
- When you are ready installing VBulletin open phpMyAdmin and go to your VBulletin DB and change the charset for usernames!
- table: vbul_user
- fiels: username (Change only the collation for this field)
- Collation: utf8_unicode_ci
- If you do not set this to utf8_unicode_ci and keep it utf8_bin then all usernames (logins) are CaseSensitive!!
- When you change it to utf8_unicode_ci logins are NOT CaseSensitive
STEP 6
I have also set the options mentioned in thread : http://www.vbulletin.com/forum/showthread.php?t=259250
- Also try emptying the blank character stripper:
Admin CP -> vBulletin Options -> Censorship Options -> Blank Character Stripper
- Also try emptying the blank character stripper:
Admin CP -> vBulletin Options -> Censorship Options -> Blank Character Stripper
- Also, the "prevent shouting" feature can cause problems for some non-English languages. Try disabling it:
Admin CP -> vBulletin Options -> Message Posting and Editing Options -> Prevent 'SHOUTING'
- Furthermore. Check ALL other vbulletin setting that have to do with forum/thread/post display
Check the title max. char. setting, post max. char settings etc..Make sure they are the same as on your old forum which you are going to import
STEP 7
- Make sure your HTML charset is set corectly:
Admin CP -> Languages & Phrases -> Language Manager -> [Edit Settings] -> HTML Character Set
- Set it for the default language to UTF-8
STEP 8
- Download any language file you want to use.
- Unzip it to some directory.
- Now open the XML file with any unicode editor that is capable of saving to UTF-8 without BOM (Byte Order Mark)
I Use foxe225 beta (http://www.firstobject.com/dn_editor.htm)
- The top part of the file needs to be edited. I used the turkish language file.
- Find the following code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <language name="Tr-Turkce" vbversion="3.6.0" product="vbulletin" type="custom"> <settings> <options><![CDATA[1]]></options> <languagecode><![CDATA[tr]]></languagecode> <charset><![CDATA[ISO-8859-9]]></charset>
Code:
<?xml version="1.0" encoding="UTF-8"?> <language name="Tr-Turkce" vbversion="3.6.0" product="vbulletin" type="custom"> <settings> <options><![CDATA[1]]></options> <languagecode><![CDATA[tr]]></languagecode> <charset><![CDATA[UTF-8]]></charset>
<?xml version="1.0" encoding="ISO-8859-1"?> to <?xml version="1.0" encoding="UTF-8"?>
Now SAVE the file in UTF-8. and you are done.
STEP 9
- Now it's time to import/install other language files
- Check to make sure encoding for all other imported languages are set to UTF-8
STEP 10
Import your data from your old forum. (See the manual.)
Comment