# `PhoenixLiveGantt.Utils.I18n`
[🔗](https://github.com/mdon/phoenix_live_gantt/blob/v0.4.0/lib/phoenix_live_gantt/utils/i18n.ex#L1)

Minimal translation helper for Gantt labels + month names.

Consumers pass a `translations` map to override the English defaults
for the labels the chart actually renders (toolbar buttons, sidebar
header, edge indicators, etc.). Anything not overridden falls back
to the default English string.

## Example

    translations = %{
      labels: %{today: "Aujourd'hui", task: "Tâche"},
      month_names_short: %{1 => "Janv", 2 => "Févr", ...}
    }

    I18n.label(:today, translations)
    #=> "Aujourd'hui"

# `translations`

```elixir
@type translations() :: %{
  optional(:month_names_short) =&gt; %{required(1..12) =&gt; String.t()},
  optional(:labels) =&gt; %{required(atom()) =&gt; String.t()}
}
```

# `label`

```elixir
@spec label(atom(), translations(), map()) :: String.t()
```

Look up a label string by atom key (`:today`, `:task`, etc.) and
format `%{count}`-style placeholders against the bindings map.

# `month_name_short`

```elixir
@spec month_name_short(1..12, translations()) :: String.t()
```

Short month name (e.g. "Apr") for month number 1-12.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
