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.
Post Reply
User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Adding language variables for custom styles

Post by 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?
Formerly known as 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
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Adding language variables for custom styles

Post by 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
Made by developers, for developers!
My blog

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Adding language variables for custom styles

Post by 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.
Formerly known as 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
keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: Adding language variables for custom styles

Post by 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
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Adding language variables for custom styles

Post by 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
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Adding language variables for custom styles

Post by 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.
Made by developers, for developers!
My blog

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Adding language variables for custom styles

Post by 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
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: Adding language variables for custom styles

Post by 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.

Post Reply