Less code duplication, duh.

git-svn-id: http://yourls.googlecode.com/svn/trunk@901 12232710-3e20-11de-b438-597f59cd7555
Prepare for those funky RTL locales.

git-svn-id: http://yourls.googlecode.com/svn/trunk@902 12232710-3e20-11de-b438-597f59cd7555