Page 1 of 1
What is a theme???
Posted: Sun Nov 20, 2005 11:37 am
by alex.barylski
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?
Posted: Sun Nov 20, 2005 2:12 pm
by josh
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
Re: What is a theme???
Posted: Sun Nov 20, 2005 3:53 pm
by Roja
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...
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.
Language files, which are output text, are data. It doesn't belong with themes (layout and style).
Posted: Mon Nov 21, 2005 3:27 am
by Maugrim_The_Reaper
Language files, which are output text, are data. It doesn't belong with themes (layout and style).
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.
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?
Posted: Mon Nov 21, 2005 9:18 pm
by alex.barylski
Maugrim_The_Reaper wrote:Language files, which are output text, are data. It doesn't belong with themes (layout and style).
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.
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?
Sweet
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

Posted: Mon Nov 21, 2005 10:24 pm
by d_d
Keeping themes and language files separate will make it easier for non programmers to do translations. Since you may have to explain the process to people who don't speak English as their first language the simpler it is the better.
Posted: Tue Nov 22, 2005 5:05 am
by Maugrim_The_Reaper
Keeping themes and language files separate will make it easier for non programmers to do translations
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?