Doing a multi-lingual site and it'd be great to have the node's language as a token to pass to pathauto.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | token_233076_2.patch | 1.3 KB | greggles |
| #1 | token_233076.patch | 1.24 KB | drewish |
| token_language.diff | 1.17 KB | drewish |
Doing a multi-lingual site and it'd be great to have the node's language as a token to pass to pathauto.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | token_233076_2.patch | 1.3 KB | greggles |
| #1 | token_233076.patch | 1.24 KB | drewish |
| token_language.diff | 1.17 KB | drewish |
Comments
Comment #1
drewish commentedhere's a re-roll.
i should add that this is now a core field so it doesn't belong in the i18n per #176449: Token support (primarily for pathauto).
Comment #2
gregglesAdded filtering and a little if statement so it gets set to blank string in case there is no language (which I assume can happen...).
Comment #3
drewish commentedgreggles, i guess the xss filtering can't hurt but it does see a little over the top, core doesn't run the role names through a filter but like i said it doesn't hurt anything.
the language should always be set--even if it's just to an empty string--since it's loaded from the node table.
Comment #4
gregglesGreat - I removed the crazy if, left in the filtering, and applied this to the 6.x branch.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
colanFor contexts outside of nodes, see #975116: Create a 'language' token type (D7) (for content and interface languages).