Skip to main content

README.md

# WarframeWorldstateDataElixirTools

Elixir library for translating [Warframe](https://www.warframe.com) worldstate data keys into human-readable strings. Inspired by the [warframe-worldstate-data](https://github.com/WFCD/warframe-worldstate-data) JavaScript project.

## Installation

```elixir
def deps do
  [
    {:warframe_worldstate_data_elixir_tools, "~> 0.1"}
  ]
end
```

## Usage

```elixir
alias WarframeWorldstateDataElixirTools.Translations

# Translate a sol node
Translations.node("SolNode1")
#=> "Galatea (Neptune)"

Translations.node("SolNode1", :de)
#=> "Galatea (Neptun)"

# Translate a mission type
Translations.mission_type("MT_DEFENSE")
#=> "Defense"

# Translate a language string (from languages.json)
Translations.language_string("/lotus/types/challenges/seasons/daily/seasondailycollecthundredresources")
#=> "Gatherer"
```

## Supported locales

`:en`, `:cs`, `:de`, `:es`, `:fr`, `:it`, `:ko`, `:pl`, `:pt`, `:ru`, `:sr`, `:tr`, `:uk`, `:zh`

## Data files

This library reads from JSON data files in `priv/data/`. The data files are bundled with the Hex package.

If you translation related contributions, please make them on the Javascript project and they will be picked up here too.

## Modules

- `WarframeWorldstateDataElixirTools.Translations` — all translation functions (main public API)
- `WarframeWorldstateDataElixirTools.DateTimeTools` — UTC datetime helpers