Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Automatic Language Detection
  • Posted: 09.02.2004, 21:56
     
    jfudickar
    rank:
    Freshman Freshman
    registered:
     February 2004
    Status:
    offline
    last visit:
    15.02.04
    Posts:
    4
    Hi,

    is it possible to automaticly activate a specific language.

    If using my national web-address www.oratool.de i want to activate the german language, if using the international www.oratool.com i want to use the english language.

    Any ideas ?

    Greetings and thanks
    Jens
  • Posted: 10.02.2004, 02:22
     
    nate_02631
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    11.04.08
    Posts:
    3055
    You can change the language dynamically by reloading the page with:

    Code

    &newlang=en

    tacked on to the URL (or ? if there are no other parameters)...

    You could perhaps, in the themeheader of your theme, use a PHP environment variable to check what URL is being accessed, and reload the page in that language (using the PHP env variable plus the appended desired language) if it is already not set to the language in question. There's a pnAPI function call "getlanguage" or something to that effect to find out what language is being used...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Posted: 15.02.2004, 23:07
     
    jfudickar
    rank:
    Freshman Freshman
    registered:
     February 2004
    Status:
    offline
    last visit:
    15.02.04
    Posts:
    4
    Hi

    Thanks. It works. With one comment. The language shortcut is "eng" icon_smile

    Greetings
    Jens

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula