eZ Community » Forums » Setup & design » URLTranslator and multiple site_access
expandshrink

URLTranslator and multiple site_access

URLTranslator and multiple site_access

Wednesday 17 April 2013 5:26:48 pm - 6 replies

Hello,

My site got several site_access to handle multiple languages, including one in Chinese.

My issue is about the use of NiceURLs. I'm trying to get URL with Chinese characters example : www.myurl.com/你好 , and this of course only for the chinese site access. I'm currently using this setting to avoid the "node_666" in URL instead of object name :

[URLTranslator]
TransformationGroup=urlalias_iri

in my chi-CN Site access, and this is working when i use the bin/php/updateniceurls -s chi-CN.

 

Nevertheless, when i do the php bin/php/updateniceurls.php -s chi-CN (or --siteaccess=chi-CN), all the URLs of the site are now under "urlalias_iri" format, including French or Spanish languages ; they are configured to work with "urlalias" only, and therefore must ignore accents in URL. This is no longer the case after the updateniceurl with china site access thing. Because of this i have "www.myurl.com/rené" (note the accent on é) in French when i should (or would) have "rene" without accent.

Does anyone know if there is a way to apply the TransformationGroup=urlalias_iri to a restricted list of site_access ? Or am I missing something ?

Thank you

Modified on Wednesday 17 April 2013 5:44:28 pm by Math Del

Thursday 18 April 2013 5:03:50 am

Is your setting for TransformationGroup=urlalias_iri being read from only the siteaccess site.ini.append.php files? Make sure it is not also set in override/site.ini.append.php. 

If you turn the setting back to urlalias and run the update script only for your french site do the URLs for the chinese site switch back, too?

Thursday 18 April 2013 11:06:55 am

Hi Math, please also note that for urlalias_iri , eZ Publish is happy for you to use Roman characters without accents/flourishs/macrons etc - it will always revert the user to the correct URL.

Not what you're after, but good to know happy.gif Emoticon

Thursday 18 April 2013 5:20:10 pm

Quote from Mark Marsiglio :

Is your setting for TransformationGroup=urlalias_iri being read from only the siteaccess site.ini.append.php files? Make sure it is not also set in override/site.ini.append.php. 

If you turn the setting back to urlalias and run the update script only for your french site do the URLs for the chinese site switch back, too?

Thank for answer,

The setting is only in the chinese siteaccess. All other siteaccesses are set to the default value (urlalias).

If I run the update script with siteaccess=site_french as param, the Chinese URL switch back to "node_xxxx". It seems that the passed siteaccess is used as configuration for the script, for the entire site. And not only for the URL of the specified siteaccess. This is why i wonder if this parameter allows to define which siteaccess configuration the script will use use to rewrite all URL's (for exemple, -s site_china will rewrite all URL with the TransformationGroup=urlalias_iri), or to choose on which siteaccess apply the TransformationGroup.

What I ideally need would be "rewrite chinese URLs only, using chinese siteaccess parameters", and what i actually get is "rewrite all URLs, using chinese siteaccess parameters" (where parameters are, in fact, the [URLTranslator] section of the parameters). Is there a way to get what I need ?

@Geoff

Actually, it could be useful to me. Are you telling me that urlalias_iri transforms "rené" to "rene" ? Because in my case, it remains "rené" in the url sad.gif Emoticon Or that eZ is able to find the correct URL even if we put "rene" in URL where it should be "rené" ?

Thank you.

Monday 06 May 2013 11:15:40 am

The reply has been removed because of violation of forum rules.

Monday 06 May 2013 11:47:26 am

@Math, it's the latter - eZ is able to find the correct URL even if we put "rene" in URL where it should be "rené".  Check it out, in action here - replace the "à" with "a" or even "A" (eZ is rather clever happy.gif Emoticon

The downside of this, is that your users don't know this is possible.  

But users rarely type a full URL these days (copy & paste, search, or click a link instead), so just ensure that any short URLs are flourish-free. You can always add a separate field in your content for the URL alias, if you want to keep the flourish in the title/name.

Hope this resolves your problem (or half of it) - if it does please mark this issue as resolved by clicking the icon next to the issue title.

Cheers,
Geoff  

Modified on Monday 06 May 2013 11:55:56 am by Geoff Bentley

Monday 13 May 2013 12:00:57 pm

Thank you for help Geoff. I picked the option of adding a field for the URL alias a few days after my last post, and I'm glad to see this is one of the option you submitted ! This was the only way for me to have exactly what I needed, since it can't be resolved with configuration options only -sadly-.

Again, thanks.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from