user language detection for dates. Some refactorings