phpbb Multilingual!?

Having a question about translating phpBB3? Want to discuss and collaborate with people currently translating phpBB3? Here would be the correct place to do so.
Scam Warning
freeland88
Registered User
Posts: 3
Joined: Sun Sep 02, 2007 11:24 am

phpbb Multilingual!?

Post by freeland88 »

Hey folks!

I really admire phpbb with everything to it, and phpbb3 is just awesome. now - as one could guess - i'm putting up a new phpbb forum right now and it happens to be 'multilingual' one. its supposed be always in the native language of the visitor.

NOW, phpbb3 is pretty new to me, and i'm wondering about two things. is it somehow possible to put the language in the link linking to the forum? (i'm thinking of something like '/forum/index.php?sid=XXX&lang=en' or similar).

i'm trying to make my phpbb installation REALLY multilingual.
so, and this is my second thought, is there a way to make the category and forum names and descriptions in different languages, so that every visitor from eg spain or france could read the forum name and description in spanish / french!?

i'm really hoping that you could help me with that. i'd appreciate it a lot! also if you have any better idea to make phpbb multilingual, i'd love to hear about that!

lookin' forward ;)

be free ~*land
~~the humans did not have natural enemies any more, so they invented the computer~~
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: phpbb Multilingual!?

Post by david63 »

freeland88 wrote:is it somehow possible to put the language in the link linking to the forum? (i'm thinking of something like '/forum/index.php?sid=XXX&lang=en' or similar).
That will require a mod.
freeland88 wrote:is there a way to make the category and forum names and descriptions in different languages, so that every visitor from eg spain or france could read the forum name and description in spanish / french!?
The only way I am aware of to do that would be to enter the names in the different languages.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
freeland88
Registered User
Posts: 3
Joined: Sun Sep 02, 2007 11:24 am

Re: phpbb Multilingual!?

Post by freeland88 »

do you know if there is a modification like that out for phpbb3?
i'd like it if the visitors could also see the forum in their native lang - not only if they are registered, so passing the language on with a link from the mainsite would be the most easy way (in my opinion). there i still the option of scripting that the language of the browser is used, but i'm trying to avoid that - users may want their language, not the one of the browser.
david63 wrote:The only way I am aware of to do that would be to enter the names in the different languages.
Do you mean entering the name of a forum in every language? like "Support/aide/ayuda/Hilfe"? And the description to it also?
certainly, i do have to think about this if there is no other 'easy' way, but i hope there is! the forum i am working on is - as time goes on - going to be in a lot of differnet languages. and i don't just say that - it won't be like just two, three, four or five^^. having each vistor have to look for their native language somewhere between the forum titles would not be very userfrienly.

maybe it would be possible to use the language file? like enter the forum title in every language file, upload it and let the script call it? are you familiar with the language-file programming of phpbb?

be free
~~the humans did not have natural enemies any more, so they invented the computer~~
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: phpbb Multilingual!?

Post by david63 »

freeland88 wrote:o you know if there is a modification like that out for phpbb3?
I do not think that there is but I have an idea that somebody did suggest it fairly recently - you could take a look through the mod requests forum.
freeland88 wrote:maybe it would be possible to use the language file? like enter the forum title in every language file, upload it and let the script call it? are you familiar with the language-file programming of phpbb?
The problem with that idea is that the forum names are held in the database - not the language file, so you would need to have some kind of online/"on the fly" translation tool to do it.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
freeland88
Registered User
Posts: 3
Joined: Sun Sep 02, 2007 11:24 am

Re: phpbb Multilingual!?

Post by freeland88 »

alright. the problems described above are not my only ones (i just thought this is not the right place to ask for it, but now i'll try it anyway)>

*is there a way to "hide" a forum from public? eg it should just not show up in board index etc. of the forums, but it should be able of being called by something like viewtopic.php?f=XX&t=XX

*is it possible to only display specific forums in the board index etc. depending on the current displayed language?

and i did a little research on this.
*mad_cat already requested something like this two months ago here
as i described above, i'd love something like this too.

*and there was something about switching the language here
this is kind of what i want, yet they tell there with one of the code changes there its possible to use ?language=XX but i don't see how that should work. php get 'language' is no where defined, is it? i always thought this feature must be available on a standard installtion. still hoping that phpbb3 does not only call the language from the database. also the imageset is as important as the language file itself.

*so i also found a request for a auto detect language bot here
also not answered.

so i see this language thing is a problem here. maybe it involves a lot of code changes. maybe not. as of now, i want to use phpbb3 as my form (really great forum). and i'm familiar with php as well as mysql, but not with phpbb3 / its code (just got a rough idea).

if someone could help me getting started with what i want to do or even someone that would help me, or know someone that would help me doing that... i need to know what functions, dbtables etc. would be best to alter for all that.

someone out there, who is familiar with phpbb3 and get me started? someone willing to walk through that with me? and maybe (if it's nessessary) a moderator that'd move this topic to an appropirate forum?

countin' on ya guys!

be free
~~the humans did not have natural enemies any more, so they invented the computer~~
Prusik
Registered User
Posts: 2
Joined: Thu Mar 20, 2008 9:25 pm
Location: Switzerland

Re: phpbb Multilingual!?

Post by Prusik »

david63 wrote: The problem with that idea is that the forum names are held in the database - not the language file, so you would need to have some kind of online/"on the fly" translation tool to do it.
Hello
We've got exactly the same issue. We have a multilingual forum and it would be great, if it was possible to see only the language the user selected as forum name. Is there a solution available? If not, we might try to solve it ourselves - could you give us any hints for doing this?
We've already had some idea, and I don't know, if they'll work - or if there is a better one.
One possibility was to use delimiters - for example "Support \ Aide \ aiuto" - and now we'd know, that the first part is English and can display this one (should be possible to do with a bit of regex) - but there we could get into troubles, because the field "forum_name" in the database is a Varchar with 255 signs, and this might be too short.
Another thought wa to add a database table with translations inthere, for example like this:
t_translation
[forum][german][english][french]
1 # Hilfe # Help # aide
2 # Test # test # teste
...

and in the table t_forums, we'd enter a number as name - so we'd have to look it up in t_translation (with the key saved in forum_name).

What do you think? What is possible, and which is the easiest / best way?

Thanks for any hints and greetings
Prusik
PS: Sorry for the mistakes - English isn't my mother tongue...
iSkywalker
Registered User
Posts: 238
Joined: Sun Mar 02, 2008 5:00 pm

Re: phpbb Multilingual!?

Post by iSkywalker »

install free language translator from Google for webmaster and wait until PhPBB staffs come up with something like mutilingual forum SMF.
Prusik
Registered User
Posts: 2
Joined: Thu Mar 20, 2008 9:25 pm
Location: Switzerland

Re: phpbb Multilingual!?

Post by Prusik »

I do not want google to take the translation - I want to do it myself - google would have problem doing it (is a specific vocab) - indeed, Itried it, using a additional table - and this seems to be working - I have to have another look at it (haven't time at the moment...) - but it is yet possible to have multilingual forum names on the forum overview... but thanks for helping!
giraff
Registered User
Posts: 4
Joined: Thu Mar 27, 2008 1:51 pm

Re: phpbb Multilingual!?

Post by giraff »

Hi everyone,
we found a way to make this: The Forum name is not a VARCHAR(255) but a BLOB, this means it can be longer than 255 characters. To implement the multilangual support you need to do the following (at your own risk...I propose you do some backup before)

1. Enable your ACP to enter forum names longer than 255 charachter. replace the line

Code: Select all

<dd><input class="text medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
in board_root/adm/style/acp_forum.html with the line

Code: Select all

<dd><textarea name="forum_name" rows="2" cols="45">{FORUM_NAME}</textarea></dd>


2. Add the function

Code: Select all

function split_name2languages ($input, $lang) {
	$tmp = explode('#', $input);

	switch ($lang) {
		case 'de': $l=1; break;
		case 'fr': $l=2; break;
		case 'fr-standard': $l=2; break;
		case 'it': $l=3; break;
		case 'en': $l=4; break;	
		case 'en-gb': $l=4; break;
		default: $l=0; break;
	}

	if ($tmp[$l]=='') {
		$out=$tmp[0];
	} else {
		$out=$tmp[$l];
	}

	return $out;
}
to board_root/includes/functions.php. This Function splits the name to languages. the switch defines in which order your names need to be entered. in our example it is like this: "default#german#french#italian#english". The default-value will be displayed, when a language ist not specified. In our examlpe: When the forum name is defined to be "Infos for new users#Infos für neue Benutzer ### Infos for new users", the Forum name for french and italian users will be "Infos for new users"

3. Output the Splitted names to the templates: Wherever theres a line like this:

Code: Select all

FORUM_NAME'	=> $row['forum_name'],
change it to

Code: Select all

'FORUM_NAME'	=> split_name2languages($row['forum_name'],$user->data['user_lang']),
There are quite many of them. Mainly in the files board_root/includes/functions_display.php, UCP-Files, MCP-Files, and some more. When you want the Forum descriptions and rules also to be multilangual you can use the same function, but you need also to edit the files where descriptions and rules are outputted to the templates. Make sure that the variable $user is global variable in all the functions in which you call the split_name2languages(..) function

4. Edit your Forum Names in the ACP. (And maybe Rules/Descriptions too)

5. Have fun! and enjoy the rest of the day :)
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: phpbb Multilingual!?

Post by Smix »

david63 wrote:
freeland88 wrote:is it somehow possible to put the language in the link linking to the forum? (i'm thinking of something like '/forum/index.php?sid=XXX&lang=en' or similar).
That will require a mod.
... :arrow: this should be helpful
rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: phpbb Multilingual!?

Post by rufuz »

Smix wrote: ... :arrow: this should be helpful
thanx a lot, easy installation and works good ;)

bye

ricc.
rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: phpbb Multilingual!?

Post by rufuz »

oops I just spoke too early... iconsets don't switch to new language... :(

I''m writing to the modder. If any change will be applied I'll take you updated...

bye

ricc..
iSkywalker
Registered User
Posts: 238
Joined: Sun Mar 02, 2008 5:00 pm

Re: phpbb Multilingual!?

Post by iSkywalker »

Rufuz,

What does it do. That site just shows some download links but there are no information of what they are.
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk

Re: phpbb Multilingual!?

Post by Raimon »

iSkywalker wrote:Rufuz,

What does it do. That site just shows some download links but there are no information of what they are.
From the zip;
MOD Description wrote:Allows users to quickly change their language by adding ?lang= to the URL.
So users can select the language , domainname.com/phpBB3/index.php?lang=nl or something like that :D
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me @ www.raimon.nl for fair prices and good service!
rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: phpbb Multilingual!?

Post by rufuz »

iSkywalker wrote:Rufuz,

What does it do. That site just shows some download links but there are no information of what they are.
Here is the related post:

http://www.phpbb.com/community/viewtopi ... 5#p5192615

Return to “[3.0.x] Translations”