About / Multilanguage module
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
would it be possible for the About module to be compatible with the multilanguage module? I've tried to edit the page directly but can't find the correct code to create an if/then construction |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Here is how I did it. <?php defined("SYSPATH") or die("No direct script access.") ?> <?= t("YOUR text goes here.") ?> <?= module::get_var("about", "code"); ?> 2. save. See in action: Similar to the About page you will have to edit that page as well. Dave _____________________________________________ |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
I'm beginning to feel like a complete idiot... I really don't understand this, sorry I'd been working on doing it like this: if($_COOKIE['g_locale']==nl_NL ***HTML CONTENT DUTCH*** if($_COOKIE['g_locale']==en_US ***HTML CONTENT ENGLISH***
but quite obviously it doesn't work or I wouldn't be tearing my hair out.. heh... |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I gave you steps to try did those not work? Dave |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
I did exactly as you described but when I went to translation mode all I could translate was the actual name of the module, not the actual content of the page. I know I must be doing something wrong but I'm trying to add a completely new system to the several languages in my head and it seems they're just not able to play nice :p |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
maybe a very bold question: if I give you the html I put in the admin of About, could you edit it for me so I might actually understand what's going on? |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
the translation trick works for several other things, like my edited credit line. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
Could this be because it contains quite a bit of html? Could be I never tired to add html to the t()function <?= t("YOUR text goes here.") ?> <table border="0"> <tbody> <tr> <td><?= t("This is some text") ?></td> <td><?= t("and some more") ?></td> <td><?= t("even more") ?></td> </tr> <tr> <td><?= t("next") ?></td> <td><?= t("column") ?></td> <td><?= t("has text") ?></td> </tr> </tbody> </table> Save that to the view file ( not the UI for the module ) and you should be able to translate the text. Dave _____________________________________________ |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
if I give you the html I put in the admin of About, could you edit it for me so I might actually understand what's going on? Sure post it here as an attachment or via PM Dave |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
ah, so basically this only works with text... I'm in trouble then, since it's not only the text that needs to change but also the images displayed. for example EN: <br> Should you have any questions or if you just want to keep posted on updates: <br> <br> <a href="http://www.facebook.com/pages/Amalaswintas-Abyss/220185631338420" target="_blank"><img src="http://www.amalaswinta.com/gallery3/about thumbs/facebookEN.png"></a> <a href="mailto:contact@amalaswinta.com"><img src="http://www.amalaswinta.com/gallery3/about thumbs/EmailEN.png"></a> <br> NL: <br> Mocht je vragen hebben of wil je gewoon op de hoogte blijven van updates: <br> <br> <a href="http://www.facebook.com/pages/Amalaswintas-Abyss/220185631338420" target="_blank"><img src="http://www.amalaswinta.com/gallery3/about thumbs/facebook.png"></a> <a href="mailto:contact@amalaswinta.com"><img src="http://www.amalaswinta.com/gallery3/about thumbs/Email.png"></a> <br> that's why I was hoping there'd be an "if locale==en_EN" function I could use |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
you're an absolute angel!!! here's the EN code: <p style="margin-left: 45px; margin-right: -125px;"> <br> <br> <img src="http://www.amalaswinta.com/gallery3/about thumbs/welcome.png"> <br> <br> All images in this gallery were created using various applications (mainly <i>Poser</i> and <i>Photoshop</i>).<br> Quite a large number of them is for sale, either as postcard(set) or as poster. <br> <br> <i>I only sell digital versions of my images in exceptional cases, after signing a contract on proper use.</i> <br> <br> On occasion I create per request. <br> In those cases the image <i>will</i> most likely be added to the gallery but will <i>not</i> be for sale. <br> <br> <br> Should you have any questions or if you just want to keep posted on updates: <br> <br> <a href="http://www.facebook.com/pages/Amalaswintas-Abyss/220185631338420" target="_blank"><img src="http://www.amalaswinta.com/gallery3/about thumbs/facebookEN.png"></a> <a href="mailto:contact@amalaswinta.com"><img src="http://www.amalaswinta.com/gallery3/about thumbs/EmailEN.png"></a> <br> <p style="margin-left: 45px; margin-right: -110px;"> <img src="http://www.amalaswinta.com/gallery3/about thumbs/rule.png"> <p style="margin-left: 45px; margin-right: -125px;"> <br> Click on any of the images below to get started. <br> Enjoy browsing the gallery and feel free to leave a comment. <br> </p> <p style="margin-left: 30px; margin-right: -125px;"> <br> <a href="http://www.amalaswinta.com/gallery3/index.php/gothic"><img src="http://www.amalaswinta.com/gallery3/about thumbs/gothic.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/fantasy"><img src="http://www.amalaswinta.com/gallery3/about thumbs/fantasy.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/other"><img src="http://www.amalaswinta.com/gallery3/about thumbs/other.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/Portraits"><img src="http://www.amalaswinta.com/gallery3/about thumbs/portraits.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/humor"><img src="http://www.amalaswinta.com/gallery3/about thumbs/humor.png"></a> </center> </p> and the NL code: <p style="margin-left: 45px; margin-right: -125px;"> <br> <br> <img src="http://www.amalaswinta.com/gallery3/about thumbs/welcome.png"> <br> <br> Alle afbeeldingen op deze site zijn gemaakt met behulp van verschillende programma's (voornamelijk <i>Poser</i> en <i>Photoshop</i>).<br> Een behoorlijk aantal afbeeldingen is te koop, hetzij als kaart (in setjes) of als poster<br> <br> <i>Ik verkoop alleen bij hoge uitzondering de digitale versie van mijn afbeeldingen, alleen na het ondertekenen van een contract over het toegestane gebruik.</i> <br> <br> Bij gelegenheid maak ik ook afbeeldingen op verzoek. <br> In die gevallen zal de afbeelding zeer waarschijnlijk wél aan de site worden toegevoegd maar zal dan niet te koop zijn. <br> <br> <br> Mocht je vragen hebben of wil je gewoon op de hoogte blijven van updates: <br> <br> <a href="http://www.facebook.com/pages/Amalaswintas-Abyss/220185631338420" target="_blank"><img src="http://www.amalaswinta.com/gallery3/about thumbs/facebook.png"></a> <a href="mailto:contact@amalaswinta.com"><img src="http://www.amalaswinta.com/gallery3/about thumbs/Email.png"></a> <br> <p style="margin-left: 45px; margin-right: -110px;"> <img src="http://www.amalaswinta.com/gallery3/about thumbs/rule.png"> <p style="margin-left: 45px; margin-right: -125px;"> <br> Klik op een van de afbeeldingen hieronder om te beginnen. <br> Veel plezier met het bekijken van de afbeeldingen. Voel je vrij om een reactie achter te laten. <br> </p> <p style="margin-left: 30px; margin-right: -125px;"> <br> <a href="http://www.amalaswinta.com/gallery3/index.php/gothic"><img src="http://www.amalaswinta.com/gallery3/about thumbs/gothic.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/fantasy"><img src="http://www.amalaswinta.com/gallery3/about thumbs/fantasy.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/other"><img src="http://www.amalaswinta.com/gallery3/about thumbs/other.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/Portraits"><img src="http://www.amalaswinta.com/gallery3/about thumbs/portraits.png"></a> <a href="http://www.amalaswinta.com/gallery3/index.php/humor"><img src="http://www.amalaswinta.com/gallery3/about thumbs/humor.png"></a> </center> </p> |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
<? $locale = Gallery_I18n::instance()->locale(); if ($locale == "en_US") { ?> Yankey
Dave |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthank |
|
Amalaswinta
Joined: 2011-06-06
Posts: 67 |
![]() |
and the best thing is: I actually (sort of) understand what's happening so I can use if to solve some other problems too :D so, again, thank you so much for your help, you've made it to the credit page on my site ;) |
|