How to specify a theme (language) in the URL? [message #39561] |
Tue, 06 November 2007 19:29 |
gniw
Messages: 2 Registered: November 2007 Location: Toronto
Karma: 0
|
Junior Member |
|
|
I am testing FUDForums for a multi-lingual (Chinese & English) web site, and I'd like the visitor to see FUDForums in Chinese if they clicked a link from the Chinese site and see FUDForums in English if they clicked a link from the English site. Is this possible and how do I do it? Thanks a lot!
|
|
|
|
|
Re: How to specify a theme (language) in the URL? [message #39693 is a reply to message #39691] |
Tue, 20 November 2007 18:07 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
First of all create 2 themes, call them "english" and "chinese".
Then open users.inc.t and look for the line which says:
define('fud_theme', 'theme/' . ($u->theme_name ? $u->theme_name : 'default') . '/');
Above this line you can do
if (!empty($_GET['theme'])) {
$u->theme_name = $_GET['theme'];
}
FUDforum Core Developer
|
|
|
|
|
|
|
|