Skip to main content
Topic: Language files and captcha (Read 2928 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Language files and captcha

How about moving language files out of themes folder since they do not belong there?
Same goes for sounds and fonts used for captcha...

Re: Language files and captcha

Reply #1

This has been discussed ad nauseum. There is good reason why a theme would want to change the language strings and not much reason to make them global.

Re: Language files and captcha

Reply #2

Weeell...
Actually I don't really like languages being into the theme's directory as well.
I'm not even so fond on themes adding their own language files[1] but even if a theme wants to add its own language file, it can be loaded from within the theme and handled as an "exception" to the normal language selection (also because at that point the language file belongs to the theme, not to the "application" in my understanding).

Sounds are language-dependant already, so it would make sense IMHO to have them into the language directory to me (and them being non-web-accessible wouldn't change much since already what is done is read the files php-side and output the combined thing).

Then, I have no big knowledge of history, so I'm happy to hear why it would be a bad idea to move languages out of the themes directory. :D
but that is debatable and I don't care enough to start a discussion on the topic
Bugs creator.
Features destroyer.
Template killer.

Re: Language files and captcha

Reply #3

Maybe because it may look like elk is copying Wedge? :P
Go ahead, now is the time to do it. After you're out of beta it's too late. Making languages non-theme specific by default will make life easier for everyone. Wedge also supports overriding languages from within skins and it's all good.

You have my thumbs up if you do that.

Re: Language files and captcha

Reply #4

Quote from: Nao – Maybe because it may look like elk is copying Wedge? :P

Yeah because we all know that you came up with all these ideas first.   :P
Success is not the result of spontaneous combustion, you must set yourself on fire!

Re: Language files and captcha

Reply #5

For an SMF codebase? Well, yeah.
Wedge is innovative. Elk is innovative. SMF is a piece of conservative crap. It's only getting started with copying Wedge's concepts and it's only because of someone who liked what he already did in Wedge years ago...

I'm not sure your smiley was really tongue in cheek. I'm a bit weary of external communication after that annoying discussion with the SMF team this week.

Re: Language files and captcha

Reply #6

I agree with moving the language files out of the theme, but I think the theme needs a method for overwriting those language files if it does. Best way I can figure to do that is to use my recommendation for a Translator class and then lazy load the language files. If $txt is called, then it will load all of the language files. So, that will be pretty late for everything except for errors. By that time, the theme should be loaded or it doesn't really matter anyway.

Re: Language files and captcha

Reply #7

It's not hard to allow themes to override language files or even individual strings. It does not have to imply the original language strings are in a theme folder. Really! ^^