• [MOD] Language select 4 0 5 1
Currently:  

Author Topic: [MOD] Language select  (Read 296248 times)

0 Members and 1 Guest are viewing this topic.

Offline fgabriel

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: [MOD] Language select
« Reply #120 on: November 16, 2006, 01:16:34 PM »
yes i know that but im a initial php user  8)
do you know  how :roll: i resolve this with php, like add/call your variable on every php.file...index, search,categories, etc....
i will very gratefull fot that :)
regards


Offline giusi83

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • GM - Photo
Re: [MOD] Language select
« Reply #121 on: November 21, 2006, 11:54:54 AM »
Hi all,

Can someone tell me, what i have to change if i want the language drop down menu on the right side?

http://www.gm-photo.ch/4images

thanks a lot in advance.

Giuseppe

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Language select
« Reply #122 on: November 21, 2006, 12:46:01 PM »
... only on the right side ... than try this in your template ...  :wink:
Code: [Select]
... <tr><td align="right">{lang_select}</td></tr> ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline giusi83

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • GM - Photo
Re: [MOD] Language select
« Reply #123 on: November 21, 2006, 01:28:08 PM »
in wich file??

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD] Language select
« Reply #124 on: November 21, 2006, 04:16:28 PM »
... only on the right side ... than try this in your template ...  :wink:
Code: [Select]
... <tr><td align="right">{lang_select}</td></tr> ...

Hi,
this is a little bit wrong....
{lang_select} is in his template not in a table

Search in templates/4dark/home.html:
Code: [Select]
{header}
{lang_select}

replace with this:
Code: [Select]
{header}
<div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" align="right">{lang_select}</td>
  </tr>
</table>
</center></div>

TEST: Put the new code in the end of the code from the header.html
Delete {lang_select} in home.html. Now you have the language in every page



cu
Kurt

Offline giusi83

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • GM - Photo
Re: [MOD] Language select
« Reply #125 on: November 21, 2006, 05:00:47 PM »
Hi Kurt,

Thank you very much.

So hmmm.. I want the language drop down under the search field.. And now it takes to much place on my site.

Offline giusi83

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • GM - Photo
Re: [MOD] Language select
« Reply #126 on: November 23, 2006, 08:46:36 AM »
Wie kann das Sprachmenu unterhalb vom Suchfeld platzieren?
Es stört mich auch, das so viel Platz unterhalb und oberhalb ist.

http://www.gm-photo.ch/4images/


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Language select
« Reply #127 on: November 23, 2006, 10:19:17 AM »
@ giusi83
... platziere dein Sprachmenue doch platzsparend in der "user_box" ...
... setze dazu den Tag {lang_select} in der user_loginform.html und user_logininfo.html ein ...
... damit wird das Menue auch auf allen Seiten angezeigt ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline giusi83

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • GM - Photo
Re: [MOD] Language select
« Reply #128 on: November 23, 2006, 10:36:08 AM »
Hallo mawenzi,

Danke vielmals für die Lösung!! Finde ich sehr gut! Genau das wollte ich!

Danke vielmals.

Muss mich noch ein bisschen mit HTML befassen.. :-)

Hast du eine gute Referenz?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Language select
« Reply #129 on: November 23, 2006, 10:43:24 AM »
... na sieht doch bestens aus ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD] Language select
« Reply #130 on: January 04, 2007, 10:22:01 AM »
Hi all, hallo an alle,

D: mit diesem Mod wird beim Auswählen einer anderen Sprache gleichfalls das tempate/Design gewechselt.
E: With this MOD your site visitors will be able chose language and automatically a different template/style.

1:
D: Als erstes den "Language select" MOD einbauen.
E: First integrate the "Language select" MOD

2:
Open global.php
Find:
Code: [Select]
//-----------------------------------------------------
//--- Generate Setting --------------------------------
//-----------------------------------------------------
$sql = "SELECT setting_name, setting_value
        FROM ".SETTINGS_TABLE;
$result = $site_db->query($sql);
if (!$result) {
  echo $lang['no_settings'];
  exit;
}
while ($row = $site_db->fetch_array($result)) {
  $config[$row['setting_name']] = $row['setting_value'];
}
$site_db->free_result();

after add:
Code: [Select]
// registering global variable "user_template"

if (!isset($user_template))
   session_register("user_template");

// check global variable for Empty

 if ($user_template=="" || empty($user_template))
   $user_template = $config['template_dir'];


// set the Template if QueryString is not nothing
if (!empty($l) || $l != "")
$user_template = $l;   

  $config['template_dir'] = $user_template;

3:
D:
Als letztes müssen die neuen template Ordner mit den neuen styles hochgeladen werden.
Namen der jeweiligen template Ordner entsprechen der jeweiligen sprache (deutsch, english, usw.)
Jede Sprache hat nun sein eigenes Style.
Um den nun überflüssigen default Ordner löschen zu können, muss im Admin Controll Panel der
template Ordner "deutsch", bzw. die Standart Sprache, gewählt werden.  Fertig  :wink:

E:
in the last step you must upload the new template directories with the new styles.
The names of the directories must have the language names ( like: english, deutsch, ...)
Now every langugae have a different style.
Now you dont need the default template directory. Before you delete them, go into
your admin controll panel and chose for your default template in the dropdownform this
template with the standart page language. Finish  :wink:


Vorher / before:

www.yourDomain.de
 4images             
   |-- templates 
          |-- default (dein / your standard template)

Nachher / after:

www.yourDomain.de
 4images             
   |-- templates 
          |-- deutsch (dein / your standard template)
          |-- english
          |-- und so weiter / and so on


cu
Kurt

   

Offline tansamalaja

  • Full Member
  • ***
  • Posts: 185
    • View Profile
Re: [MOD] Language select
« Reply #131 on: February 22, 2007, 04:10:46 PM »
/index.php&l=deutsch
File Not Found!

Error 404

Sometimes this error appears if I click on "Home" from different categories or detail-sites.
After changing the server weg got this problem the first time, it's not really reproducible,
that's the problem - sometimes the error 404 appears, sometimes not. And we got a hint,
that the "&" could be the problem.

Sometimes we have an "?" before the "l=deutsch", sometimes we have the "&" - is this
okay so?

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [MOD] Language select
« Reply #132 on: March 04, 2007, 09:53:23 PM »
@kurtw and all others

how can i get the lang templates go working with 4images version 1.7.4 :?:

I had it working perfect under 1.7.1

Under 1.7.4 it is not changing the templates.
I receive the error that it is not possible to open the choosed template.

Any solutions :?:

EDIT : 8) Ok it is working now again under 1.7.4.
It was the modifcation for template change on page 3 by v@no not the mod by kurtw.
« Last Edit: March 07, 2007, 12:06:25 AM by bibabobu »

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [MOD] Language select
« Reply #133 on: April 10, 2007, 01:30:32 PM »
You also can try this solution:

Code: [Select]
<form name="javascript:location.reload()" id="form1">
  <select name="l" onchange="javascript:submit()">
  <option value="">Sprache</option>
    <option value="english">english</option>
    <option value="deutsch">deutsch</option>
  </select>
</form>

Very simple but it works with 1.7.4... (o:

Offline Charliexiong

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Language select
« Reply #134 on: April 14, 2007, 03:09:20 AM »
Can anyone help me with this?

if I want (language variable == english)
{ do something}

if (language variable == chinese)
{do something else}

what is the language variable, it seems that $l is not recognized.

thanks