What do you think a theme should encompass???
I personally have always included the following:
- Layout Images
- HTML Templates w/ CSS, JScript, etc...
However now that i'm branching into the world of making my web apps multi-language I'm contemplating moving language files into the theme's directory as well...
Reason being, some themes may use icons and others may use text or include verbose descriptions...
So I figured perhaps language files would also be theme specific, causing quite a bit of redundancy, but required...
so...
What do you think as a programmer you would prefer?
What is a theme???
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
I'd keep language seperate, have a language directory and have each language have a folder, with an index in each folder that includes all the other .php files for that language, inside the language's php files you have a bunch of defines,
then when your theme outputs something like a welcome message you do
This way you can let the user change their language in their control panel or what not, and just include the corresponding language definitions for each user
then when your theme outputs something like a welcome message you do
Code: Select all
echo (LANG_WELCOME);Re: What is a theme???
I generally make the game language independent first, and do theming second. By doing so, I ensure that the language files aren't theme-specific.Hockey wrote:However now that i'm branching into the world of making my web apps multi-language I'm contemplating moving language files into the theme's directory as well...
Language files, which are output text, are data. It doesn't belong with themes (layout and style).
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
I'd have to argue it "depends". We all know about the "depends" argument - all those odd exceptions and references to a "developer's preferences", et all.Language files, which are output text, are data. It doesn't belong with themes (layout and style).
Text is content, content is? Static? What if you want to change some content - just for kicks lets say, between themes? Point I'm trying to make (in my usual merry-go-round fashion) is that you can simply leave language mixed up in HTML in language specific sub-directories of a theme.
It has its issues, everything does, but is there anything technically wrong with having a bunch of simple html (with content) files rather than a bunch of html (with placeholders) files and language file(s), needing to be linked? What if the html needs language specific adjustments? What if it needs specific CSS changes?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
SweetMaugrim_The_Reaper wrote:I'd have to argue it "depends". We all know about the "depends" argument - all those odd exceptions and references to a "developer's preferences", et all.Language files, which are output text, are data. It doesn't belong with themes (layout and style).
Text is content, content is? Static? What if you want to change some content - just for kicks lets say, between themes? Point I'm trying to make (in my usual merry-go-round fashion) is that you can simply leave language mixed up in HTML in language specific sub-directories of a theme.
It has its issues, everything does, but is there anything technically wrong with having a bunch of simple html (with content) files rather than a bunch of html (with placeholders) files and language file(s), needing to be linked? What if the html needs language specific adjustments? What if it needs specific CSS changes?
Thats all I needed to continue the madness...
Thing is...my app supports themes and mutli-language support
Currently have two themes (each requires a seperate language pack)...
Here is the reason behind having theme specific language tables...
Each theme targets a different user...one theme is mostly icons for advanced users...the other is more textual - very verbose!!! for newbies
Besides...I figure how difficult can it be to keep on track of simple string tables
Cheers
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
Except themes are generally a mix of HTML and CSS - the only PHP will (or should) be presentation logic. This logic rarely needs changing for varying languages, while the HTML/CSS may. Do you need to be a programmer to read HTML?Keeping themes and language files separate will make it easier for non programmers to do translations