Hi,
i need for a project to have 3 languages, with in each language the same products but of course with a specific url.
So the url must look like :
www.root.com/mypage (must be translated)/mycategory (can be the same in 3 langs)/product-name (can be the same in 3 langs)
So i want 1 article for 1 product (and within 3 langs translations fields), but how to manage a perfect url? Is it possible with news module to modify for example http://www.root.com/news/16/17/product-name.html to http://www.root.com/mypage/mycategory/product-name.html.
Must i use htaccess to modifiy the urls ? Does anybody have one sample that work?
Thanks for any help!
Multilingual site and news article custom url
Re: Multilingual site and news article custom url
I *think* it can be done but it will always involve two steps:
Inside the template displaying the urls you need to change the url according to the language. Perhaps by a (regex) replace using Smarty.
Then, in the .htaccess you need to rewrite those urls back to the original ones which are the only ones recognized by News module (note that you could add query strings to this rewritten urls during this process, so inside the module template you can determine the original language of the url clicked).
I'm not sure if other modules have better multi-language support regarding custom urls.
Inside the template displaying the urls you need to change the url according to the language. Perhaps by a (regex) replace using Smarty.
Then, in the .htaccess you need to rewrite those urls back to the original ones which are the only ones recognized by News module (note that you could add query strings to this rewritten urls during this process, so inside the module template you can determine the original language of the url clicked).
I'm not sure if other modules have better multi-language support regarding custom urls.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Multilingual site and news article custom url
This is not easily possible with the News module.
As @Velden said, you may be able to trick the system by
a: adjusting the URL's in the summary and detail templates to have the appearance of what you want
b: adjusting your .htaccess file to translate the URL back to something that the News module understands and can route to.
but it will always be problematic.
There is certainly nothing built in to CMSMS or the News module to allow you to specify a pattern for the URL like that.
As @Velden said, you may be able to trick the system by
a: adjusting the URL's in the summary and detail templates to have the appearance of what you want
b: adjusting your .htaccess file to translate the URL back to something that the News module understands and can route to.
but it will always be problematic.
There is certainly nothing built in to CMSMS or the News module to allow you to specify a pattern for the URL like that.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Multilingual site and news article custom url
You can use the pretty url template of the CGBlog module for this.
Each language needs its own category.
So root-url/category/blog-title
Each language needs its own category.
So root-url/category/blog-title
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Multilingual site and news article custom url
Thanks for your help, i'll test CGBlog
Re: Multilingual site and news article custom url
you could check how i solved the same problem viewtopic.php?f=28&t=71898&p=318079#p318079
the only difference is that i used 2 separate Listit2 modules in this example.
You could go 1 step further and use 1 LISE module.
I did this on http://viaviastellenbosch.travel
The disadvantage in this solution is that you only have 1 "alias" per item so your url will be almost the same for every language.
the only difference is that i used 2 separate Listit2 modules in this example.
You could go 1 step further and use 1 LISE module.
I did this on http://viaviastellenbosch.travel
The disadvantage in this solution is that you only have 1 "alias" per item so your url will be almost the same for every language.
Kind regards,
HarmO
HarmO
Re: Multilingual site and news article custom url
Thanks for the help.
It would be very nice to be able to create custom text filed for each url lang (for Lise and other mods), perhaps someone has achieve this !?
It would be very nice to be able to create custom text filed for each url lang (for Lise and other mods), perhaps someone has achieve this !?