Pages (3):    1 2 3   
Administrator
Administrator
acrylian   05-09-2009, 08:46
#11

You will have to write some code if you want to use something like that. Zenphoto does not support determining the language via url queries. We use cookies to set the language. Look at the dynamic-locale plugin.

Member
Member
Soleil   05-09-2009, 16:13
#12

Thank you, Acrylian.

The problem is that my website is built in such a way that dynamic-locale plugin does not fit (introduction pages, navigation for the whole site on the left....).

I will apply this plug-in in another website I am working on

My question is where to put my code so that the function "Submit" links to the right page layout.

Member
Member
sbillard   05-09-2009, 17:51
#13

You can always use the setupCurrentLocale() function directly. Use whatever code you need to do a setOption('locale', yourlanguage, false); then call setCurrentLocale(); to register it.

Member
Member
Soleil   07-09-2009, 13:58
#14

Thanks sbillard !

You will excuse my poor knowledge of dealing with functions and perhaps explain me where I can find the setupCurrentLocale() function ``.

Administrator
Administrator
acrylian   07-09-2009, 14:08
#15

You find all functions on our functions documentation.

Member
Member
sbillard   07-09-2009, 17:02
#16

Specifically, setupCurrentLocale() is in the lib-i18n.php script as are all the functions dealing specifically with localization.

Member
Member
Soleil   08-09-2009, 06:36
#17

Thanks again sbillard !

Unfortuantely I cannot find the [b]lib-i18n.php [/b]script. I guess it should be in zp-core (?!).

What I cannot understand/find out is how after submitting a comment the link to the just used page is established. Could you explain me shortly how it works, which functions are involved in this process?

Comments are very important for my website since I ask for identification help of some very rare plants and animals.

Administrator
Administrator
acrylian   08-09-2009, 08:09
#18

Well. that's because it is acutally named functions-i18n.php...;-)

I don't understand your comment question. What is wrong with the standard comment usage?

Member
Member
Soleil   08-09-2009, 10:07
#19

Yes, now I found it!

But before I try to understand the "locale" system, I would like to answer the second part of your message.

As I explained above I am using (for several reasons) the following coding on my website.
``if ( $L=="FR") {

echo "&L=FR";

}

elseif ($L=="EN"){

echo "&L=EN";

}

elseif ($L=="DE"){

echo "&L=DE";

}

elseif ($L=="ES"){

echo "&L=ES";

}

else {

echo "&L=FR"; `

It works perfectly for the different pages (album and not album) but not when a user writes a comment on a page like http://www.xxx.net/album/index.php?album=xxx&image=xxx.jpg&L=FR.

After the comment has been submitted, the user comes on a page http://www.xxx.net/album/index.php?album=xxx&image=xxx.jpg, that is to say without the L=FR extension and with a lot of errrors.

How to arrange it that the extension is created after the submission of the message? I simply don't find the place in the zenphoto code where I could add my php coding for languages.

I would be very thankful if you could help me on this issue.

Administrator
Administrator
acrylian   08-09-2009, 10:33
#20

Did you look at the comment form plugin? You can change the form itself and add something to the url query. Normally it adds a # (see the "action" part) to the url so you could add your language query to it.

Pages (3):    1 2 3   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.