Page 1 of 1

Language constants - suggestion for new

Posted: Sat Nov 15, 2008 7:07 pm
by Don Chambers
Our current language files have constants for entry meta info.... for instance, meta info for an entry might be:

Posted by: john doe on date (or at time) in category1, category2, etc.

So the constants are {$CONST.POSTED_BY}, {$CONST.ON}, {$CONST.AT} and {$CONST.IN}.

The assumption is that the info always flows as author, date/time, categories.

But if you look at a template like bulletproof, where these pieces of information can be shown/hidden, or even split apart, you can see how limiting these current variables are... if I turn off the author, we lose the "Posted by"... so instead, we either we see just the word "in", or that is turned off as well.

What I am suggesting are a few new ones that a template designer can incorporate without the need to have the template itself define these variables:

Code: Select all

@define('BY', 'By');
@define('POSTED_IN', 'Posted in');
@define('POSTED_ON', 'Posted on');
@define('POSTED_AT', 'Posted at');
Thoughts? Is it worth adding to the core?

Re: Language constants - suggestion for new

Posted: Mon Nov 17, 2008 1:11 pm
by garvinhicking
Hi!

The "By" variable is IMHO to global, at least for german the "by" has many variants ("von, vom, durch") which all depend on the verb before "By".

Posted In, Posted On and Posted At look alright to me, but I'm wondering if this should go into the global s9y language file or the template specific one. As for impact, I'd say to put it into bulletproof as long as no other templates make use of it. As soon as other templates would utilize that, we could merge it into core?

The language files are already quite large, so I think it could be generally worth a look on how to optimize those....

Regards,
Garvin

Posted: Mon Nov 17, 2008 5:43 pm
by Don Chambers
This is why I typically try to avoid recommendations on language file additions! :wink: I only read and speak English, but other languages will have multiple variations for something that English does not... same with gender specific words.....

Let's avoid the issue for now. Its not that big of a deal. I can work it in at a template level. I might play with it for a bit, and it it looks really worthwhile, I can add it to BP. If it has further proof there, then we can revisit the matter at a global level because it would be ridiculous to have to translate multiple templates with these variables if they could have simply been contained at the global level. Sound good?

Posted: Mon Nov 17, 2008 7:42 pm
by garvinhicking
Hi!

Full Ack. :)

Regards,
Garvin