Closed (fixed)
Project:
Automatic Nodetitles
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2009 at 11:17 UTC
Updated:
13 Jun 2011 at 13:29 UTC
I use plain text as well as patterns to create the node title, for example my pattern is Customer - [field_fullname-raw], [field_country-raw].
I would like this to be Kunders - [field_fullname-raw], [field_country-raw] if the node language is Swedish.
Is there some way I can do this? Thanks.
Comments
Comment #1
aufumy commentedwhat is 'Customers' is it text from the body, or is it something else?
Comment #2
tomsm commentedI have a similar problem.
I have a content type called "Order". The automatic title is [type-name] [author-name] [dd]/[mm]/[yyyy].
I have translated the name of the content type "Order" (type:order:name) in French and Dutch, but when I create a node in these languages the [type-name] token is not translated.
I think this is a token, i18n issue.
Comment #3
peacog commented'Customers' is not text from the body. I enter it directly into the Pattern for the title field in the Automatic title generation section of my content type.
Comment #4
aufumy commentedI believe that you have to use the PHP option
"Evaluate PHP in pattern."
Not sure if the echo() is needed or not.
Comment #5
peacog commentedThank you for the suggestion. I tried it but I'm afraid it didn't work. I could not add translations for the word Customer in www.example.com/admin/build/translate/search. The search did not find the string. I also substituted a string that already has a translation in the Translation interface, but that didn't work either.
Comment #6
blueblade commentedi have the same problem...
Comment #7
odisei commentedThe same problem
Comment #8
mairav commentedI also need this, have any of you found a solution?
Comment #9
mairav commentedAny help about this?
Comment #10
colanSubscribing.
Comment #11
alonpeer commentedPHP evaluation can work, if the order of token and PHP evaluation will be switched.
In the function _auto_nodetitle_patternprocessor(), first the tokens are replaced, and only then the PHP is evaluated. If the order between them is switched, then titles such as the following will be evaluated correctly:
Comment #12
aufumy commentedOr use the node object.
Comment #14
bisonbleu commentedI need some help. What I'm trying to translate is the term Registration. The token [field_formsaisreg_joueur-title] refers to the full name of a person (e.g. John Smith). I used #12 this way.
and got one amazing title...
Parse error: syntax error, unexpected '[', expecting ')' in /home/renaudj/public_html/drpl1/sites/all/modules/auto_nodetitle/auto_nodetitle.module(254) : eval()'d code on line 2
What did I do wrong?
Original ANT pattern is Registration [field_formsaisreg_joueur-title], where [field_formsaisreg_joueur-title] is a cck node reference (select list widget) where "-title" points to a player's name (a node title).