Sunday 08 May 2011 3:35:50 am
I was wondering if there is possible to localize the module url. As for example, a module called user profile that can be accessed at http://www.example.com/eng/user-profile, but I want, for Spanish users, the module to be also accessible at http://www.example.com/esl/perfil-del-usuario (or whatever the right translation may be). I've tried doing this through .htaccess, but it does not work and I am not knowledgeable enough to be able to debug why not. Here is my htaccess file (I removed my modifications) # Copy this file to a new file called .htaccess in your eZ Publish root
# to make the site more secure in non-virtualhost mode (index.php used in urls).
#
DirectoryIndex index.php
RewriteEngine On
# RewriteCond %{HTTP_HOST} ^webdav\..*
# RewriteRule ^(.*) webdav.php [L]
# RewriteCond %{HTTP_HOST} ^soap\..*
# RewriteRule ^(.*) soap.php [L]
RewriteRule content/treemenu/? /index_treemenu.php [L]
RewriteRule ^var/storage/.* - [L]
RewriteRule ^var/[^/]+/storage/.* - [L]
RewriteRule ^var/([^/]+/)?cache/(texttoimage|public)/.* - [L]
RewriteRule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
RewriteRule ^share/icons/.* - [L]
RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^favicon\.ico - [L]
RewriteRule ^robots\.txt - [L]
# Uncomment the following lines when using popup style debug.
# RewriteRule ^var/cache/debug\.html.* - [L]
# RewriteRule ^var/[^/]+/cache/debug\.html.* - [L]
RewriteRule ^(.*)esl/perfil-del-usuario(/.*)?$ $1esl/user-profile$2 [L]
RewriteRule .* index.php [L]
I also tried changing last line to RewriteRule .* indexProxy.php [L]
And in indexProxy.php changing indexProxy.php to index.php and perfil-del-usuario to user-profile in REQUEST_URI, PHP_SELF, SCRIPT_NAME and then including index.php, but, in practice, this does not work. I have several modules that I want to have the url translated. Do the links really have to be the module names, or can they be localized? If not, shouldn't this be a feature?
|