Download & Extend

Using translated content type from i18ncontent as a token for pathauto

Project:Internationalization
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

This may be a duplicate, although I searched through the issues and could not find support for this feature.

When building mutlilingual websites (in our case Chinese and English), we translated content types and wanted to use this translation in the url alias. For example, http://example.com/node/123 which has the content type "Company", translated "公司" ("gongsi") in Chinese, was intended to have the following paths:

- For English: http://example.com/company/title-of-the-english-node.
- For Chinese: http://example.com/gongsi/title-of-the-chinese-node (gongsi is the transliteration of the Chinese into its pinyin equivalent).

To do so, transliteration aside, we needed a token that takes into account the language of the node and try to translate the content type into this language before using it in the path.

I guess this could be extended to i18ntaxonomy and other modules providing translation features for content that may be used as a token.

The path is attached.

AttachmentSizeStatusTest resultOperations
i18ncontent.module.patch1.05 KBIgnoredNoneNone

Comments

#1

Status:needs review» needs work

Ok for tokens, but we need some uniform naming for i18n tokens. Please see #344794: i18n support for the term and vocab node tokens

Basically, we'll use the 'i18n-' namespace for all our tokens, we don't want to clash with any other module...

#2

I'm facing this problem too. You're not alone.

#3

Are you sure this is not a duplicate of any of these:

#305639: i18n support for the tokens?
#344794: i18n support for the term and vocab node tokens
#290421: Support localized taxonomy (i18n)
#736178: Add a [node:source] token for source node of a translated node

I mean, perhaps a combination of the above might offer a solution to your issue or it is simply a subset of one of them(?). If so, then please mark this one as a duplicate and lets move the talk over there in order to keep things in one place. Thanx.

#5

Version:6.x-1.1» 6.x-1.4
Status:needs work» needs review

patch reworked as per comment #1

AttachmentSizeStatusTest resultOperations
535522-i18n-type-name.patch990 bytesIgnoredNoneNone
nobody click here