Fix getting language for uri.

There is a problem with some uri's on templates. i don't know why now, but this fix solves that issue.