phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Adding language variables for custom styles

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.

Adding language variables for custom styles

Postby MichaelC » Wed Jan 04, 2012 6:42 pm

If a style wants to have something in the text for e.g. Quick Menu for a shortcut menu in overall_header.html. It seems fine, but because no hardcoded language is allowed, the style author can't add in the text Quick Menu and has to just have an button image instead which is then almost never going to get translated?

Suggested Solution:
There could be a small RFC sub-forum to be made for 3.2 (Or maybe even 3.1) for language variables (Similar to the hooks forum) to be requested to be added to the core for use in custom styles?
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Re: Adding language variables for custom styles

Postby callumacrae » Wed Jan 04, 2012 6:59 pm

I think that a better solution would be for styles to have a language file included in them
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Adding language variables for custom styles

Postby MichaelC » Wed Jan 04, 2012 7:05 pm

That would be a better solution for style authors in one way (not having to wait for a release) but it would again, not be translated and it would also be a bit bizarre.
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Re: Adding language variables for custom styles

Postby keith10456 » Thu Jan 05, 2012 7:34 pm

callumacrae wrote:I think that a better solution would be for styles to have a language file included in them


Sounds like a good idea. Doing it this way would make the style easier to translate.
User avatar
keith10456
Registered User
 
Posts: 261
Joined: Sat Apr 22, 2006 10:29 pm

Re: Adding language variables for custom styles

Postby imkingdavid » Thu Jan 05, 2012 8:42 pm

So what kind of structure do you propose?

styles/prosilver/lang/en.php
or
language/en/style_prosilver.php
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 902
Joined: Thu Jul 30, 2009 12:06 pm

Re: Adding language variables for custom styles

Postby callumacrae » Thu Jan 05, 2012 9:17 pm

imkingdavid wrote:So what kind of structure do you propose?

styles/prosilver/lang/en.php
or
language/en/style_prosilver.php

I would suggest the first one, as the second would involve an additional file being copied.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Adding language variables for custom styles

Postby imkingdavid » Thu Jan 05, 2012 10:18 pm

I agree.. the style-specific language files would not be shipped under the language pack so it would make sense to keep the style files all together.

By the way, I posted an RFC for 3.2. This topic itself might be best under 3.2 Discussion?
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 902
Joined: Thu Jul 30, 2009 12:06 pm

Re: Adding language variables for custom styles

Postby bantu » Sat Jan 07, 2012 4:44 pm

callumacrae wrote:I think that a better solution would be for styles to have a language file included in them

I think this makes sense. It's a lot better than getting every language string into core where it has to be translated by translators although it might not be used.

Ideally there would be a style package and several language packages so the community can create more translations on their own. I however kind of doubt the Customisation Database supports dependencies right now.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 437
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany


Return to General Development Discussion

Who is online

Users browsing this forum: No registered users and 9 guests