Split out language code formatting from filename generating

Signed-off-by: Michal Čihař <michal@cihar.com>