Changing the Language of your Forum
Feb 14, 2023 8:27:06 GMT -8
Craig, Joshua Farrell, and 5 more like this
Post by ProBoards Help Guide on Feb 14, 2023 8:27:06 GMT -8
Changing the Language of your Forum
The following options allow you to offer your forum in a language other than English for your users.
Automatic Language Change Per User:
Manual Language Change for Forum:
Please note that plugins, and changes to the layout templates and headers & footers do not affect the mobile version, so users accessing the forum with a mobile device will not see the changes.
The following options allow you to offer your forum in a language other than English for your users.
- Adding Google Translate to your forum provides a dropdown menu that lets the user select the language that is most comfortable for them. This is an ideal option for a forum where the native language of its users is diverse.
- Manually changing most all the common elements to a single language is an ideal option for forums that want to designate a specific language other than English as the default language of the forum.
- It is also possible to use both the Google Translate and manual options.
Automatic Language Change Per User:
Adding Google translate to your forum.
1. Go to Admin > Structure > Headers & Footers
2. Click on Global Header & Footer
3. In the Header area add this:
Adding the above code to your Header allows it to work for all themes on your forum and any theme you add in the future.
Placement Option:
If you want more control over where the translate option resides on your forum, place the above code in your global header with the exception of this line from the above code:
Note: The div needs to be placed in all themes for the script to work. Or omit from themes where Google Translate is not desired.
1. Go to Admin > Structure > Headers & Footers
2. Click on Global Header & Footer
3. In the Header area add this:
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Adding the above code to your Header allows it to work for all themes on your forum and any theme you add in the future.
Placement Option:
If you want more control over where the translate option resides on your forum, place the above code in your global header with the exception of this line from the above code:
<div id="google_translate_element"></div>
Place this div code in the desired layout template.Note: The div needs to be placed in all themes for the script to work. Or omit from themes where Google Translate is not desired.
Manual Language Change for Forum:
Here are the areas you can manually change your forum to a different language:
Plugins
The following plugins will change the text of various elements on the forum that are not accessible via the layout templates:
Change New Feed Title:
Add this to the Main Header
(Admin > Structure > Headers & Footers > Main Header & Footer > Header)
Substitute the text Insert News Title Here with your preferred News Feed title. Keep the single quotes around the new text.
Guest Access Permission Error Message:
Add this to the Global Header.
(Admin > Structure > Headers & Footers > Global Header & Footer > Header)
Substitute the text Guests do not have permission to access this board. Please login or register to continue. with your preferred message. Keep the single quotes around the new text.
Note: with the manual language change there are still some areas that are not translated to a different language.
- Forum banner title at (Admin > Settings > Forum Settings > Forum Title field).
- New Icon Text (Forum Settings > New Icon Text field).
- The navigation menu at (Admin > Settings > Forum Settings > Navigation tab).
- The category and board names at (Admin > Structure > Categories & Boards).
- Board Descriptions
- Board Labels
- Member Ranks (Admin > Members > Member Ranks).
- Member Group Names (Admin > Members > Member Groups).
- Scour the Layout Templates for text to change (Admin > Structure > Layout Templates).
Plugins
The following plugins will change the text of various elements on the forum that are not accessible via the layout templates:
Change New Feed Title:
Add this to the Main Header
(Admin > Structure > Headers & Footers > Main Header & Footer > Header)
<script type="text/javascript">
// Change News Feed title
$(document).ready(function(){
$('#news > .nav > .title').html('Insert News Title Here');
});
</script>
Substitute the text Insert News Title Here with your preferred News Feed title. Keep the single quotes around the new text.
Guest Access Permission Error Message:
Add this to the Global Header.
(Admin > Structure > Headers & Footers > Global Header & Footer > Header)
<script type="text/javascript">
$(document).ready(function(){
if(/\/board\//i.test(location.href) && $('.container.error').length && !pb.data('user').is_logged_in)
$('.container.error > .content').html('Guests do not have permission to access this board. Please login or register to continue.');
});
</script>
Substitute the text Guests do not have permission to access this board. Please login or register to continue. with your preferred message. Keep the single quotes around the new text.
Note: with the manual language change there are still some areas that are not translated to a different language.
Please note that plugins, and changes to the layout templates and headers & footers do not affect the mobile version, so users accessing the forum with a mobile device will not see the changes.