Fix incorrect cache key for layout

The cache key of layout is generated before the call of setLocale(), so the cache key is invalid
Merge pull request #24 from bedyseb/master

Fixed invalid cache key for layout