I would like to use the node's locale in the path.
My first idea was something like that eg. /guides/[local]/title
That would be /guides/en/title and /guides/hu/title
After that I found out how can I make a better hack for this in the pathauto_node.inc.
I added this code in the node_get_placeholders():

if ($node->localizernode_locale=='hu') 
  $placeholders[t('[localguide]')] = 'leiras';
  else
  $placeholders[t('[localguide]')] = 'guide';

After that I can use the [localguide] placeholder on the node path settings page with my guide content type and my guides' path in English will be /guide/English_title and the Hungarian guides' path will be /leiras/Hungarian_title. This is very nice I think.
I know, this is a dirty hack but works for me ;-)
I wonder how can be make that better.
Basically I would like translatable placeholders.

Comments

greggles’s picture

Project: Pathauto » Token
Version: 5.x-1.1 » 5.x-1.x-dev
Status: Active » Closed (won't fix)

Well, this would be a token request, not a pathauto one.

And I'm marking it "won't fix" since I'm not really sure how to generalize this in a way that would work and have a reasonable UI.

If someone can propose one then I see it could be useful.

mitchell’s picture

I created a new issue for Token that reflects the discussion of a locale placeholder here: http://drupal.org/node/152953