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

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

0 Members and 1 Guest are viewing this topic.

Offline The Sailor

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: [MOD] Language select
« Reply #135 on: April 16, 2007, 11:04:06 PM »
- hi all i have some problems i need to fix it! because i didnt find the last Mod code to select language evry time theres some error's!
am using 1.7.4 !!!!!

- how can i change evry icone and logo of the script when i change the language!!!

- how can i change the direction of pages to "RTL because evry time i choose the arabic language the direction of pages still "LTR"??????
(^_^)

Offline Pierre

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Language select
« Reply #136 on: May 19, 2007, 11:27:52 PM »
 
Hello everybody,

About the basic use of this mod, this line:

Code: [Select]
foreach ($HTTP_GET_VARS as $key => $val) {
always returns this error:

Code: [Select]
Parse error: syntax error, unexpected T_AS in /home.xx.x/xxxx/www/x/includes/page_header.php on line 86
I tried to write $_GET, I tried another server provider, I tried some strange and funny lines of code, but the same error is still happening...
Do you know about this unexpected behaviour? Thank you and have a nice day.
 

Offline zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Language select
« Reply #137 on: May 28, 2007, 05:22:48 PM »
Hello,

i have a small problem... well... i had 4images 1.7 and had this mod installed. I put 8 textes in the main.php in every language... and put them in the home.html with a "{text1}"
Now i copied the 1.7.4 files in the 4images folder and installed the MOD and the text isn't there... it takes the space but you can't see the text  8O

here my gallery www.mangacardatabase.de.vu

I hope anybody can help me... if not i upload the 1.7 backup so i don't have these problems  :cry:

Thank you very much!

philipp4321
zerozero
--

Hallo,

Ich hab ein kleines Problemchen... Ich hatte vor kurzem noch das 4images 1.7 mit diesem MOD. Hatte zusätzlich noch Texte in die main.php geschrieben und mit {text1} in die home.html eingebunden. Man hat sie auch in jeder Sprache gesehn.
Jetzt hab ich die 1.7.4 version in den 4.images Ordner kopiert und nochmal installiert und man sieht die texte nicht. Es nimmt den Platz den es bräuchte aber man sieht keinen text...   8O

Das ist maine Gallery www.mangacardatabase.de.vu

Ich hoffe es kann mir jemand helfen... ansonsten kopier ich das backup wieder auf den space.

Danke im vorraus

philipp4321
zerozero

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD] Language select
« Reply #138 on: May 28, 2007, 05:54:18 PM »
Hallo,

in includes/page_header.php

suche:
Code: [Select]
  "charset" => $lang['charset'],danach einfügen:
Code: [Select]
  "text1" => $lang['text1'],usw....


Gruß
Kurt

Offline zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Language select
« Reply #139 on: May 28, 2007, 07:09:02 PM »
 :oops:
den hab ich wohl glatt vergessen... konnt mich gar nicht mehr dadran errinern :?

danke nochmal!

achso... deine styles rulen Kurt!

MfG
Philipp4321

Offline flyfreak

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • Flyfreak.dk
Re: [MOD] Language select
« Reply #140 on: November 09, 2007, 09:52:58 PM »
Hey

I have a problem with creating a "headline" (Please have a look at my screenshot)

I have set up the tool, but i don´t know the way to create a "headline"

My code is like this:

Code:
Code: [Select]
                    <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_vaelg_sprog}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
    <br />
                        {lang_select}
<br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
Flyfreak
Emil
Main site: www.flyfreak.dk
4Images site: www.flyfreak.dk/foto

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Language select
« Reply #141 on: November 09, 2007, 10:08:37 PM »
// Step 1

Change:

Code: [Select]
<tr>
   <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_vaelg_sprog}</td>
</tr>

for:

Code: [Select]
<tr>
   <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_select_title}</td>
</tr>

// Step 2

In lang/english/main.php file,

add in top ?>:

Code: [Select]
$lang['select_title'] = "Select language";

// Step 3

In includes/page_header.php file,

find:

Quote
"charset" => $lang['charset'],

add after:

Code: [Select]
"lang_select_title" => $lang['select_title'],

Finish.
« Last Edit: November 10, 2007, 11:45:45 AM by kai »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline flyfreak

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • Flyfreak.dk
Re: [MOD] Language select
« Reply #142 on: November 10, 2007, 09:26:01 AM »
Thanks a lot!!
Emil
Main site: www.flyfreak.dk
4Images site: www.flyfreak.dk/foto

Offline mato72

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Brick-Cinema
HTML in lang_main.php for multi-language
« Reply #143 on: December 05, 2007, 05:05:44 PM »
Hie there...
I use this mod:
http://www.4homepages.de/forum/index.php?topic=4743.0
So the Content-Text is saved/written in the directory "lang", main.php
If I do so, I could not use normal html-hyperlinks.
If I do, there will be nothing shown on the Site.
What can I do?
What do I wrong?

EDITH:
Now I get this error-message by using html-hyperlinks:
Parse error: syntax error, unexpected T_STRING in

Hallo
Ich nutze diesen Mod:
http://www.4homepages.de/forum/index.php?topic=4743.0
Wenn ich meinen text in die main.php im Ordner "lang" schreibe und dabei html-links verwende, wird in der normal Seite nichts angezeigt.
Was mache ich verkehrt?
Was muss ich anders machen?

EDIT
jetzt bekomme ich fehlermeldungen wenn ich html-hyperlinks nutze:
Parse error: syntax error, unexpected T_STRING in

Offline mato72

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Brick-Cinema
Re: HTML in lang_main.php for multi-language
« Reply #144 on: December 05, 2007, 05:25:03 PM »
Ok, habs selber über google herausgefunden.
Es liegt an den Gänsefüsschen: "
Das darf man nur mit einem Hochkomma machen : '
Ein Link sieht dann eben nicht mehr so aus:
<a href="http://www

sondern:
<a href='http://www

Das muss man ja erstmal wissen...
Somit schliesse ich den Thread auch gleich wieder....

Offline shadowhunter

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • Fotogalerie & Fotocommunity scluzern.com
Re: [MOD] Language select & Sessions
« Reply #145 on: January 24, 2008, 11:36:50 AM »
Hallo!
Ich habe gemerkt, dass in der Session die ausgewählte Sprache nicht angezeigt wird.
Somit sieht man z.B im ACP die ausgewählte Sprache nicht.
Mich würde noch wunder nehmen welche Sprache die Besucher benutzen!
Wie könnte man dies machen, dass wenn die ausgewählte Sprache nicht der Standartsprache entspricht diese dann in der Session (in session_location mit "&l=*******") anzeigen?
Ich benutze: Vers 1.7.4 & die Variante B mit Bilder dieses MODs
Ich bin euch dankbar für Antworten!
Schönen Tag & Gruss

Offline Alessio

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Webax.it [Alessio's photogallery]
Re: [MOD] Language select
« Reply #146 on: August 27, 2008, 03:49:52 PM »
Is it possible to detect automatically the language (by IP or by OS language) if are not present cookie?
Alessio
my homepage: http://www.webax.it

Offline metal_brain

  • Jr. Member
  • **
  • Posts: 90
  • For all the reasons we have to die
    • View Profile
Re: [MOD] Language select
« Reply #147 on: October 12, 2008, 09:22:47 AM »
on Lanuage select is it possible to for user to see another template??
let's say i have english and farsi
i want the user when he chooses the farsi to get a totally different template!

u'll need delete from global.php:
Code: [Select]
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']);
define('ICON_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']."/icons");
and this:
Code: [Select]
//-----------------------------------------------------
//--- Templates ---------------------------------------
//-----------------------------------------------------
include(ROOT_PATH.'includes/template.php');
$site_template = new Template(TEMPLATE_PATH);

And then find:
Code: [Select]
include(ROOT_PATH.'lang/'.$config['language_dir'].'/main.php');and insert above this:
Code: [Select]
if ($config['language_dir'] == $l) $config['template_dir'] .= "_".$l;
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']);
define('ICON_PATH', ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']."/icons");
//-----------------------------------------------------
//--- Templates ---------------------------------------
//-----------------------------------------------------
include(ROOT_PATH.'includes/template.php');
$site_template = new Template(TEMPLATE_PATH);

With this change you will need create template for each language with this name format: <template name>_<language>
for example your default language is english and have also deutsch and spanish languages.
the default template used has name blah
Then you must have three templates with names:
blah
blah_deutsch
blah_spanish


P.S. I've removed your page_header.php source, so it wont cloag up the search engine ;) next time if u want to show something like, attach the file as a .txt file ;) (or zip it)


Hi V@no
kindly is it possible to update the code so it works with 4images 1.7.6
Apparently  the global.php is 1.7.6 is not the same as the old one  :oops:
i have tried using KurtW code which is found here
http://www.4homepages.de/forum/index.php?topic=4743.msg85742#msg85742
but it didn't work
time & again we apperciate your help & your prompt replies
thanks in advance

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #148 on: October 12, 2008, 09:45:03 AM »
is it possible to update the code so it works with 4images 1.7.6
Apparently  the global.php is 1.7.6 is not the same as the old one  :oops:
Done
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline metal_brain

  • Jr. Member
  • **
  • Posts: 90
  • For all the reasons we have to die
    • View Profile
Re: [MOD] Language select
« Reply #149 on: October 12, 2008, 10:33:11 AM »
V@no thank you very much   :D
 :thumbup: