Some applications already generate URL with language code prefix and except full URL, with language prefix to work properly. For example FeinCMS is one, but I believe other similliar apps could have similiar issues with localeurl.
To make it easier for this apps to work together I am proposing following feature:
If //request.LANGUAGE_CODE// is already present, localeurl would not try to set it and strip a language prefix from //request.path_info//.
If URL generated with //reverse// already have language prefix (one of the code from //LANGUAGES// setting) //localeurl// patched //reverse// function would not try to additionally process returned URL.
If there is a concern that this could introduce backward incompatible changes, setting could be introduced that allow developer to control this feature.
What do you think?