I know it's anycontent, but is the following possible:
Display the content of anycontent.php in different laguages (simple text/links stuff, similar to what FAQ looks like.) Add some extra into a whateverlanguage.php and have it pulled up in anycontent.php.
I'm talking 2 languages here (en/ru for example). So as to when Russian is selected, visitors are greeted (in anycontent) with some text in Russian. Same goes for English.
Sure!
:)
My philosophy is to try something before asking though. If I can't figure it out, then I'll ask "is it possible."
;)
The best thing to do though, is put your changes in an external language file and add an include statement in the language file of your choice. By doing it this way, you won't have to edit the actual language files when you do an update.
-- or --
You can do a check on the selected $USER['lang'] (I think) and include the file within anycontent.php. (maybe better than the first option)
-omni
If you want to have one anycontent for English and another for anyother language have two files called (for example) englishaycontent.php and otheranycontent.php
in your anycontent.php write some thing like
if ($CONFIG['lang']=="english"){
include (englishanycontent.php);
}else{
include (otheranycontent.php);
}
Untested code but should work
You can use $USER['lang']. This could be the content of your anycontent.php file:<?php
if ($USER['lang'] == 'german') {
starttable("100%", "Willkommen");
?>
<tr><td class="tableb" >
Herzliche Begrüssung auf Deutsch
</td></tr>
<?php
} else {
starttable("100%", "Welcome");
?>
<tr><td class="tableb" >
Some greetings in english
</td></tr>
<?php
}
endtable();
?>
GauGau
hehe, nearly-simultaneous answer of three coppermine devs with nearly the same content ;D
GauGau
Indeed. I saw that Tarique was looking at it, but when I refreshed it looked like he had left the thread, so I answered. ::)
;D
Thanks guys, appreciate it. Exactly what I was looking for.
omniscient, I would have tried it had I known what I was doing. I have been working with php for only a couple of weeks. html only prior to that. That for sure doesn't make me omniscient in it, but whatever the opposite of that. ;)
Hello...and if I want to do it for more than two languages, how should I modify the code below? :-[ ???
<?php
if ($USER['lang'] == 'german') {
starttable("100%", "Willkommen");
?>
<tr><td class="tableb" >
Herzliche Begrüssung auf Deutsch
</td></tr>
<?php
} else {
starttable("100%", "Welcome");
?>
<tr><td class="tableb" >
Some greetings in english
</td></tr>
<?php
}
endtable();
?>
Thank you
<?php
if ($USER['lang'] == 'german') {
starttable("100%", "Willkommen");
?>
<tr><td class="tableb" >
Herzliche Begrüssung auf Deutsch
</td></tr>
<?php
} elseif ($USER['lang'] == 'spanish') {
starttable("100%", "Bienvenido");
?>
<tr><td class="tableb" >
Algo en Español
</td></tr>
<?php
} else {
starttable("100%", "Welcome");
?>
<tr><td class="tableb" >
Some greetings in english
</td></tr>
<?php
}
endtable();
?>
With the actual code removed, just some pseudo-code to make the structure more obvious:<?php
if ($USER['lang'] == 'german') {
// german stuff here
} elseif($USER['lang'] == 'spanish') {
// spanish stuff here
} elseif($USER['lang'] == 'dutch') {
// dutch stuff here
} else {
// all other languages
}
?>
HTH
Thank you a lot GauGau for your answers and patience :)