zenphoto forums » Usage Support

Questions about switching languages and URLs

(4 posts)
  • Started 2 years ago by straurob
  • Latest reply from sbillard
  1. straurob

    Member
    Joined: Aug '10
    Posts: 33

    Hello,

    I know there is the dynamic_locale and seo_locale plugins which allow setting different languages of a theme. However there are the following questions:

    1.
    With the default settings of seo_locale the URLs look as follows:

    http://domain.com/zenphoto/de_DE/gallery1
    http://domain.com/zenphoto/en_US/gallery1

    Is is possible to change the URLs so that they will look like this?

    http://domain.com/zenphoto/de/gallery1
    http://domain.com/zenphoto/en/gallery1

    2.
    How can I keep the above URLs unchanged?

    Example:
    If I enter http://domain.com/zenphoto/en_US/gallery1 then the theme is displayed in English but the URL is rewritten to:

    http://domain.com/zenphoto/gallery1

    3.
    Is it possible to use a clickable image, i.e. flags to change the language?

    Thanks :-)
    Robert

    Posted 2 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,514

    1. Probably, but these are the official locale names since there are several "de" variants as there are "en" ones.

    2. Zenphoto does not require the locale in the url as it stores the current one for the current visitor in sessions/cookies. If you use the sitemap in multilingual mode it generates each url with all locales you have activated. You should add the link to the sitemap ot the robot.txt file. All proper search engines should use that then.

    3. That is an option of the dynamic locale plugin. You should have seen that at the bottom of the setup script when installing.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. straurob

    Member
    Joined: Aug '10
    Posts: 33

    Thanks for the reply.

    1.
    I solved this by adding two rewrite rules to the .htaccess file which is working fine.

    2.
    Your statement is correct and it is working fine. However I'd like the locales to appear in the URL although it might not make sense from a technical point of view. It's just for "optical reasons" so that a visitor would always know which locale is being used.

    I looked at the seo_locale.php and .htaccess but couldn't find where the locale is removed from the URL.

    3.
    Oops, you're right. Didn't see this :-)

    Posted 2 years ago #
  4. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,824

    The locale is not removed from the URL. It is just not put there in the first place since it is not needed.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.