4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Vincent on April 17, 2005, 04:11:43 PM
-
Hello
on my homepage when i add some information like a copyright information i crate a copyright.php file (with minimum code) this php will call a copyright.html file!
the html file I do edit and write down all the infromation - so far is everithing all right!
But if i wish to go more international i will need to rewrite something, so my question how could i do it different to be able to switch easy the language? First language is German - but later i wish also english, french, türkish!
thanks
for a feedback
vincent
-
in your .php file u should have register some tags, there u can add something like: "lang_copyright" => $lang['copyright'], which will register {lang_copyright} template tag with content of your $lang['copyright'] variable (that variable should be in your lang/<yourlang>/main.php file.
-
could you pleas explain me how i should do it? I tryed it but it was not working!
vincent
in your .php file u should have register some tags, there u can add something like: "lang_copyright" => $lang['copyright'], which will register {lang_copyright} template tag with content of your $lang['copyright'] variable (that variable should be in your lang/<yourlang>/main.php file.
-
for any text, you want to have multi-lingual:
first we have to make the language tag in the language-files
so we have to open
lang/<yourlang>/main.php
and at the end just before ?> add this line:
$lang['copyright'] = "Copyright violators will get kicked in the b***s (if no b***s available, *ss will be used for kicking)";
now, when the lang-variable does exist, we can register it into the templates as a tag...
so open
./includes/page_header.php and find:
$site_template->register_vars(array(
"media_url" => MEDIA_PATH,
"thumb_url" => THUMB_PATH,
with a lot of more variables there... and into that array add
"lang_copyrigt" => $lang['copyright'],
for your copyright notice...
In this array:
"lang_copyright" will be your tag-text in the template files
and
$lang['copyright'] is the reference to the language-variable...
then you can use {lang_copyright} - look at the page_header.php code above, where we just registered it as "lang_copyright"...
Notice: this is just an example, so if you want to:
- kick no b***s for copyright violation, but tell an absolute different story, replace copyright with different_story or anything you consider appropriate
- use the language-tag only on the home-page, use it in index.php or only on a category page, use it in categories.php etc.
If you use this - register the tag under
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
because
$site_template->register_vars(array(
is more than one time in the code there for different situations...
[li]add another language tag, create the language variable in the language/<yourlanguage>/main.php and register it in the .php file of your needs...[/li]
[li]if you create a new lang['yourlanguagevariable'] in the lang/<yourlang>/main.php files, check if "yourlanguagevariable" is not there already - otherwise it won't work as you expect :wink:[/li]
[/list]
I hope that it is right what I wrote :D
It at least works on my 1.7 gallery...
-
@matrix
you want belive it but it works :lol:
but :?
if i have a Headline i would like to make a <H2> text </H2> it makes error
or i would like a spezial font
or maybe a table
or a url to a homepage or a php file
is it possible to add it in the Main.php
sincerly
vincent
-
Great! :D
I believe it, if you write it :wink:
but :?
I don't really understand what you want to say with
if i have a Headline i would like to make a <H2> text </H2> it makes error
or i would like a spezial font
or maybe a table
or a url to a homepage or a php file
is it possible to add it in the Main.php
hm... if you just want to ask if html is allowed to use in the main.php file then: yes 8O
you may use formatting tags... use images instead of text...
BUT BEWARE: quotes MUST always follow after a \!
So instead of font="arial" you MUST write font=\"arial\"
-
i mean if you go to my page the copyright
is as haed 2 definet in html but if i add the code <H2> i get a error
but maybe i have to use \<H2>
will try
vincent
-
well, "an error" is not enough to help you :roll:
Your doctor won't help you also if you tell him "I have some problems" :wink:
I don't see any error on your copyright page
-
right !
i have a table as example with my adresse:
$lang['IKOV_Adresse'] = "<table><td>Meine Adresse:</td><td>Vincent Kocher<BR>Gotthelfstrasse 14<br>CH-4800 Zofingen<br>Schweiz</td></table> ";
above it works
but i would like to have the "<table><td valign="top">Meine Adresse
to add this part i make a error
-
BUT BEWARE: quotes MUST always follow after a \!
So instead of font="arial" you MUST write font=\"arial\"
:|
Did you read that?
Did you post it like you wrote here (incl. the valingt), or did you write
$lang['IKOV_Adresse']="<table><td valign=\"top\">"Meine Adresse?
-
:) no no writing faster then thinking and controlling
and now it works i put the \ on the wrong plase
and it works also with the H2 code
cheers thanks
a lot
vincent
PS what next to improve? :wink:
-
Copyright violators will get kicked in the b***s (if no b***s available, *ss will be used for kicking)
LMAO! I choked on the chicken I was eating, when saw that...lol nice!
@Vincent:
I thought <tr> tag should be between <table> and <td> :?: :?
-
@Vano
if you just have one field you don't need <TR>
sincerly
vincent