Problem/Motivation
Sometimes we could need to use a transliterated field in a View or in a view mode (the Token one in particular).
Proposed resolution
Create a new field formatter for text field to allow to transliterate them.
Remaining tasks
Create the field formatter
User interface changes
None
API changes
None
Comments
Comment #1
duaelfrHere is the patch !
This patch is part of the #1day1patch initiative.
Comment #2
pakmanlhPatch works for me, I generated one for stable version.
Congratulations and thanks for the work :)
* Update! Sorry, my patch is the same :P
Anyway seems that conversion does not correct, because the blank spaces are are converted in underscores, and maybe should be hyphens.
I would use transliteration_get function instead of transliteration_clean_filename in line 139.
or maybe directly the pathauto_cleanstring function, what do you think?
Comment #3
amateescu commentedThanks for the patch, sounds really useful!
Yes, you should probably use
transliteration_get(), but if you're interested in the other cleanup that is happening intransliteration_clean_filename(), we should probably also move that to a new helper function.And replacing spaces with underscores or hyphens should be a formatter setting.
Comment #3.0
amateescu commentedUpdated remaining tasks
Comment #4
circuscowboy commentedI have been using this patch for a couple of years now and it is working great. I extended it to included taxonomy term names. I have attached a new patch. I am going to try to find a bit of time to clean up the patch as per above so it can get committed
Comment #5
circuscowboy commentedOops error in my patch - new version