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 »

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 »

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 »

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.

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: Adding language variables for custom styles

Post by keith10456 »

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 »

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 »

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 »

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 »

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