We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
User-friendly translations manager for Elixir/Phoenix projects. Simplify the process of managing translations by providing an intuitive interface for adding, editing, and deleting translations with live UI integration.
Quick reference for installation, configuration, and usage of Kanta.
def deps do
[
{:kanta, "~> 0.4.2"},
{:gettext, git: "git@github.com:ravensiris/gettext.git", branch: "runtime-gettext"}
]
end
mix ecto.gen.migration add_kanta_translations_table
# config/config.exs
config :my_app, Kanta,
endpoint: MyAppWeb.Endpoint, # Your app Endpoint module
repo: MyApp.Repo, # Your app Repo module
otp_name: :my_app, # Name of your OTP app
plugins: []
defmodule MyApp.Repo.Migrations.AddKantaTranslationsTable do
use Ecto.Migration
def up do
Kanta.Migration.up(version: 3)
end
def down do
Kanta.Migration.down(version: 3)
end
end
defmodule MyAppWeb.Gettext do
use Gettext, otp_app: :kanta_landing, repo: KantaLandingWeb.GettextRepo
end
# application.ex
def start(_type, _args) do
children = [
...
{Kanta, Application.fetch_env!(:my_app, Kanta)}
...
]
...
end
# router.ex
import KantaWeb.Router
scope "/" do
pipe_through :browser
kanta_dashboard("/kanta")
end
# Add to deps in mix.exs
{:kanta_deep_l_plugin, "~> 0.1.1"}
# Configure in config.exs
config :kanta,
plugins: [
{Kanta.DeepL.Plugin, api_key: "YOUR_DEEPL_API_KEY"}
]
# Add to deps in mix.exs
{:kanta_po_writer_plugin, git: "https://github.com/curiosum-dev/kanta_po_writer_plugin"}
# Configure in config.exs
config :kanta,
plugins: [
Kanta.POWriter.Plugin
]
# Add to deps in mix.exs
{:kanta_sync_plugin, "~> 0.1.0"}
# Create migration file
defmodule MyApp.Repo.Migrations.AddKantaSyncTables do
use Ecto.Migration
def up do
Kanta.Sync.Migration.up(version: 1)
end
def down do
Kanta.Sync.Migration.down(version: 1)
end
end
# Add API routes in router.ex
scope "/" do
kanta_api("/kanta-api")
end
# Environment variables (required)
KANTA_API_ENDPOINT="https://production-app.com/kanta-api"
KANTA_SECRET_TOKEN="$(mix phx.gen.secret 256)"
# Optional: Disable default authorization
config :kanta,
disable_api_authorization: true
Automatically analyzes .po files and converts them to database format for convenient use.
Messages and translations are stored in database tables for easy viewing and modification.
Track translation progress across languages with visual dashboard and filtering options.
Intuitive web interface for adding, editing, and deleting translations with live updates.
Machine translation support with DeepL API for quick translation assistance.
Synchronize translations between development, staging, and production environments.
Kanta's development depends on you.
We invite you to discuss, contribute and share Kanta with others.
Join #kanta to ask questions and share feedback.
Report bugs and request features.
Hang out with the Curiosum community.