diff --git a/README.md b/README.md index 545b00e..be2f8ec 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,23 @@ Expand **Or paste a token manually** and enter a bearer token from your Indiekit ### Language -The plugin follows Obsidian's display language. Set it in **Settings → About → Language**. Currently supported: English (`en`), German (`de`). +The plugin follows Obsidian's display language automatically. Set it in **Settings → About → Language**. + +| Code | Language | +|---|---| +| `en` | English | +| `de` | German | + +#### Adding a translation + +1. Copy `src/lang/en.ts` to `src/lang/.ts` (e.g. `pt-BR.ts` → use code `pt`) +2. Translate every string value — keep all `{placeholder}` tokens unchanged +3. Register the locale in `src/i18n.ts`: + ```ts + import { pt } from "./lang/pt"; + const locales = { en, de, pt }; + ``` +4. Open a PR — translations are always welcome --- @@ -222,6 +238,10 @@ src/ IndieAuth.ts PKCE IndieAuth sign-in via GitHub Pages relay SettingsTab.ts Obsidian settings UI SyndicationDialog.ts Pre-publish dialog to select syndication targets + i18n.ts t() helper — locale detection and string lookup + lang/ + en.ts English strings (source of truth, 63 keys) + de.ts German strings ``` ---