Posted by Hugo Wetterberg on December 9, 2008 at 3:02pm
8 followers
| Project: | Internationalization |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
This patch implements support for localized vocabularies (through i18ntaxonomy) for the node tokens [vocab], [vocab-raw], [term] and [term-raw].
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| token_node.taxonomy.i18n.patch | 1.82 KB | Ignored: Check issue status. | None | None |
Comments
#1
The changes are made in the function node_token_values in token_node.inc
#2
Yeap, it works great.
Tkx, alot! ;)
#3
Awesome ! Thanks :o)
#4
Thanks for providing these. However...
Then this code should be added to the i18n module.
#5
We can't really do too much till token module allows some way to override existing tokens defined by other modules.
Anyway, we can provide new tokens using some i18n namespace 'i18n-xxx'
#6
Yes, that's exactly what I think makes sense for i18n to do.
#7
So I needed this for terms, made a patch that works and then found this thread afterwards, looks like I ended up doing things in the lines greggles suggested.
Anyways, I basically ripped the code off from the tokens module implementing hook_token_list and hook_token_values, and added some language testing before sending the term through the tt function.
~Jakob
#8
This starts looking good but the tokens group shouldn't be i18ntaxonomy, but 'term' or 'vocabulary'. Let's just use the same as the token module uses, and the same token names just with a 'i18n-' prefix (prefix just for token names, not for objects).
#9
Okay, so it's been almost 2 months, so I'm still a bit rusty since I haven't looked at this since.
Anyways, I don't really understand your reply. The patch above for the terms was create by copying the relevant part from the token module and then adding in the language checks and i18n specifics. In other words, this is exactly how the token module does it. The token names are also as you requested above, same as tokens only with the "i18n-" prefix. So I'm a bit puzzled as to why you are asking for things i believe I already have provided. If I'm mistaken or have misunderstood you please write in greater detail what's lacking in the patch, so I or some one else can improve it so we can get this feature into i18n.
#10
#8: These tokens are in the node group, since the patch is showing taxonomy terms attached to nodes in the node's defined language.
I've looked over the patch, and it looks fine. It does have an instance of "vocabolaries" but that aside, I'd say it's RTBC.
#11
Yes, I don't know which code I was looking at, sorry.
Thanks, committed. Nice work.
#12
Automatically closed -- issue fixed for 2 weeks with no activity.