phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Load default language before other languages?

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Load default language before other languages?

Postby naderman » Thu Apr 19, 2012 4:58 am

We created a patch [1] for Forumatic to allow us to use incomplete language files without errors or missing output. Instead english is displayed in these places. The patch could be adjusted to load the default board language instead. At the same time this is a lot of overhead if the chosen language is actually complete, since both languages are completely loaded (although not kept in memory, since values overwrite each other). Do you think this is something we should add to phpBB or should we rather stick to having "{ L_MISSING_VAR }" output and errors if a key is used directly in the code?

[1] https://github.com/naderman/forumatic-p ... lish.patch
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Load default language before other languages?

Postby brunoais » Thu Apr 19, 2012 8:56 am

We could do a "cachy" thing with this.
We could try creating singular files with the result of merging both languages (the en and the other language) for each language.
Basically, do with lang files what you do with template files. Cache 'em
I don't know how correct that is but it's a solution. The extra space used does not seem to be a problem. What do you think?
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: Load default language before other languages?

Postby Oleg » Mon Apr 23, 2012 2:06 am

What prompted doing this patch in the first place?
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Load default language before other languages?

Postby brunoais » Mon Apr 23, 2012 7:13 am

^
The missing values for the keys in the foreign language translations cause the key to be outputted instead of the value in english.
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: Load default language before other languages?

Postby Jocelyn79 » Mon Apr 23, 2012 5:22 pm

I like that idea of replacing missing values in the default language by the ones in english.
Does anyone know what are the effects on performance?
Jocelyn79
Registered User
 
Posts: 11
Joined: Mon Apr 04, 2011 12:42 pm

Re: Load default language before other languages?

Postby brunoais » Tue Apr 24, 2012 10:59 am

^
I have a good clue on that. It's significant, if the forum is working for a medium or larger community.
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: Load default language before other languages?

Postby Oleg » Tue Apr 24, 2012 2:35 pm

brunoais wrote:^
The missing values for the keys in the foreign language translations cause the key to be outputted instead of the value in english.

This much is obvious, the question is in what use cases does this situation arise?
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Load default language before other languages?

Postby naderman » Tue Apr 24, 2012 3:11 pm

Having added some language keys for a custom page in english, which I'd like to show up in english when using another language which I don't have a translation for yet.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Load default language before other languages?

Postby Jocelyn79 » Tue Apr 24, 2012 3:54 pm

The problem may also happen if you install a mod that adds new language keys.
Most mods deliver texts only in English, so unless you update all your other language files, "{L_MISSING_VAR}" will show when using a language other than English.
Jocelyn79
Registered User
 
Posts: 11
Joined: Mon Apr 04, 2011 12:42 pm

Re: Load default language before other languages?

Postby MartinTruckenbrodt » Wed May 09, 2012 8:50 pm

Hello,
I think this a very important feature request.
At least it should be used if there are additional MOD language files missing, At least this would be a great thing for the large add-ons like gallery, calendar and so on.

An older topic here to complete this topic about multi language (pack) boards: viewtopic.php?f=105&t=33528

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
 
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany

Next

Return to [3.x] Discussion

Who is online

Users browsing this forum: EXreaction and 8 guests