Knowledgebase
How to disable language selection for registered users
By default registered users can select from the user control panel their default board language from the ones that are installed. In this article we'll show you how to remove this option from the panel. We'll use as an example the prosilver style, which is the default style that comes with every phpBB3 installation package.
You can remove the language selection option by commenting out some code in one of the style's template HTML files. To comment it out means to put an exclamation mark and two hyphens (e.g. !--) after the first bracket for the specific string of code and two hyphens (--) before the last bracket of the string of code.
For the prosilver style you have to comment out some code in the file ucp_prefs_personal.html. It's located in the template folder of the style (e.g. public_html/phpbb3/styles/prosilver/template). You have to comment out the following code:
<dl> <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt> <dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd> </dl>When it's commented out it should look like this:
<!--dl> <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt> <dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd> </dl-->You can edit the file from the Files section of the Pixie control panel. Just navigate to the file's location, click on it's name with the left mouse button, make the change and click on the Save and Close button. You can also edit the file by downloading it with an FTP client, editing it with a text editor (e.g. Notepad, Wordpad) and uploading it back.
The example above is for the style prosilver but the code looks very similar for other styles. For example, in the other style that comes prepackaged with phpBB3 (subsilver2) the code that has to be edited is in a file with the same name ucp_prefs_personal.html, but, of course, it's in the folder for the subsilver2 style (e.g. public_html/phpbb3/styles/subsilver2/template). The code that has to be commented out looks like this:
<tr> <td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td> <td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td> </tr>For other styles you can look for similar code and comment it out, if you want to disable language selection for registered users. If you want to enable the option, just uncomment the same code.