I18nParser v0.1.3 I18nParser.Detection View Source

Module for detection locale of the file

Link to this section Summary

Functions

Detects locale for the file

Link to this section Functions

Link to this function detect(file, extension) View Source
detect(String.t(), String.t()) :: {:ok, %{code: String.t()}}

Detects locale for the file

Parameters

  • file: path to file for locale detection
  • extension: extension of the file

Examples

iex> I18nParser.Detection.detect("/some_path_to_file", "yml")
{:ok, %{code: "en"}}