Language variable

Hi, I'm trying to intergrate zenphoto 1.1 into a multi language site and although I don't need zen in other languages, I do want to be able to pass a language variable to it so I can navigate to a page related to a gallery in the correct language.

My site stores the lang in the url like this /en/dir/ /es/dir/ and the chmod gets the en part and gives it to my php page. Is there a way I can do this with the zenphoto chmod without having a separate installation for each language?

Again I don't need zenphoto to display the other languages, just hold the variable for it so I can return to my site pages in the correct language.

Thanks for any help

Comments

  • acrylian Administrator, Developer
    I think the best solution would be to use a cookie.
  • Or use a session variable. More secure and compatible as a cookie.
  • acrylian Administrator, Developer
    Yeah, right.
  • Thanks for that...so i need to set the cookie/session in the theme album.php index.php etc or just the core index.php?
  • Why do you want to set this in the gallery at all? Why don’t you use it on the entry page of your home page and set it from there? Then you don’t need to use it in the gallery.

    But if you do so, you need to set it in the index file before any other output started, because it will be sent as header, if you want to use a cookie.

    For using sessions i’m not sure, but i heard, you need to “encapsulate” all output with the session start and session end tags. php.net will help ;)
Sign In or Register to comment.