I was digging around for a few hours and found a lot of stuff on this topic.
Collecting Related issues
#1574628: [term:parents:join-path] not woking with multilanguage vocabualries
#290421: pathauto patch to provide localized and entity translated taxonomy through i18n
#1177084: Translated vocabulary names not working with Pathauto
How it currently works
If i use a i18n token like test/[term:i18n-name]
The url alias is then generated in the current ui language. So if i switch ui to EN path generated is test/dog and if i switch to DE and then generate it is test/hund.
Worked only because i removed $langcode from i18n_taxonomy_tokens and applied last patch in http://drupal.org/node/290421#comment-5926502
How it should work?
I am not sure about that but i think people expect that an alias is created for every language, meaning:
test/dog
test/hund
When using bulk generation.
Comment | File | Size | Author |
---|---|---|---|
#16 | README.txt | 4.41 KB | Leeteq |
Comments
Comment #1
marcoka CreditAttribution: marcoka commentedNote,
$langcode = isset($options['language']) ? $options['language']->language : i18n_langcode();
always returns UND and so all aliases are generated as Language ALL/UND
setting $langcode here manually will get the term in the correct language. so it seems its pathauto related and that pathauto needs to set the language in the $options
$langcode = "de";
Comment #2
marcoka CreditAttribution: marcoka commentedfunction pathauto_create_alias($module, $op, $source, $data, $type = NULL, $language = LANGUAGE_NONE) {....
no $language seems to be passed, so its always "All"
Comment #3
marcoka CreditAttribution: marcoka commentedwhen inserting a term with pathauto_taxonomy_term_insert calling pathauto_taxonomy_term_update_alias($term, 'insert');
function pathauto_taxonomy_term_update_alias(stdClass $term, $op, array $options = array())
there is no $options with a language and so following check is LANGUAGE_NONE
Comment #4
Dave ReidNope, this has never been the design or intention of pathauto. We only generate one alias per item, not an alias per language, per item.
Comment #5
marcoka CreditAttribution: marcoka commentedi thought that this could maybe good for seo purposes. any opinions?
@Dave Reid, is there an interest in how we could do that?(suggestions/patches). i am asking, because if not i can save my time with patches and could just use my own sandbox for this feature.
The intention behind that is that a person can read "the url/path" in his language + seo benefits.
If there is another way, like somehow writing an addon module, i am in, but i dont think pathauto provides an api for that (dont know thats why i ask).
i have been told a submodule could work with using
hook_pathauto_alias_alter
Comment #6
marcoka CreditAttribution: marcoka commentedhere is the module i created, adding a new BULK operation.
http://drupal.org/project/pathauto_i18n_taxonomy
Comment #7
yannickooGood job e-anima!
Comment #8
marcoka CreditAttribution: marcoka commentedComment #10
klonos...actually this is WAD as per #4. Having it as "fixed" might confuse people into believing this has been addressed in the module itself.
@e-anima: Hey Marco words are not enough to express my gratitude for finally giving a solution to this issue! Thank you for all the time and effort you've put in that module. God bless you!
Comment #11
klonos...uh, before finally closing this...
@Dave Reid: can we get a mention of Pathauto i18n Taxonomy in the project's "Recommended modules" section please? Thanx in advance ;)
Comment #12
marcoka CreditAttribution: marcoka commentedremember that the current version only works for BULK UPDATE, the other update functions havent been implemented yet. (like renaming a term)
Comment #13
klonos...what we have now is better than nothing. I'm confident we'll get there too ..perhaps with some help from someone that understands the guts of pathauto [cough] Dave? [/cough] ;)
Comment #14
batigol CreditAttribution: batigol commented:P
Comment #15
candelas CreditAttribution: candelas commentedany news on translating vocabulary names? thanks for your hard work :)
Comment #15.0
candelas CreditAttribution: candelas commented.
Comment #16
Leeteq CreditAttribution: Leeteq commentedRecategorizing to have this post appear on the target list for the i18n note on the project page.
@Dave Reid: I second @klonos suggestion in #11 about specifically linking to the http://drupal.org/project/pathauto_i18n_taxonomy module on the project page (and ideally put the existing project page note and link to the mentioned module also in the README.txt - see attached file.).
Especially useful after this issue has been closed.