detectLanguageFromPath function

String detectLanguageFromPath(
  1. String path
)

Detect language from file path.

Implementation

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