Detect language from file path.
String detectLanguageFromPath(String path) { final ext = path.contains('.') ? path.split('.').last : ''; return detectLanguage(ext); }