Added getting locale from the URL segments (koajs.com/en)

I added this feature so we can detect locale using URLs like `http://koajs.com/en`.