Jump to content

Flexible friendly rewriting - language-prefix


Hessellund

Recommended Posts

I have attached an updated Link.php and Tools.php. They are based on

Feature:
* Flexible friendly rewriting of the iso-lang part of the url.

Creates possibily to use:
http://www.domain.tld/isolang/category/product
http://www.domain.tld/your-pre-fix-isolang/category/product
http://www.domain.tld/etc-prefix-isolang/category/product

instead of:
http://www.domain.tld/lang-isolang/category/product

http://www.domain.com/en/ vs. http://www.domain.com/lang-en/

Language prefix "lang-" can be substituted with anything.

Link.php is updates to use configuration "PS_REWRITING_LANG_PREFIX" to store the language prefix.
* Default is still "lang-"

Tools.php is updated to generate correct .htaccess

Missing:
* Gui frontend to change PS_REWRITING_LANG_PREFIX
** PS_REWRITING_LANG_PREFIX is stored in database table ps_configuration

Attachment added to feature request: http://www.prestashop.com/bug_tracker/view/6488/

I will add them to this forum, when I get back to my home-pc.

EDIT:
Files attached to thread - applies to PretaShop 1.4.0.4

Link.php

Tools.php

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...