# Changelog

All notable changes to WakaLang are documented here. The format is based on
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
[Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.1.0] - 2026-06-20

### Added
- Language registry (option-backed) with an admin **Languages** screen: each
  language carries a code, locale, name, native name, URL prefix, default flag
  and enabled flag.
- URL-prefix rewrite routing (`/ja/…`, `/en/…`) — the prefix is the source of
  truth for the current language; rewrite rules flush on activation/deactivation.
- Current-language context service and public template functions
  (`wakalang_get_current_language()`, `wakalang_get_supported_languages()`, …),
  with optional root-request browser-language detection and a preferred-language
  cookie (both off-by-default-friendly and configurable).
- Settings screen for URL mode, fallback behaviour, hreflang, x-default,
  cookie/browser-detection toggles and uninstall data handling.
- Translation linking: a custom `wp_wakalang_translations` table and a post-editor
  meta box to set a post's language, link it into a translation group, see the
  other-language versions, and create a draft translation. Rows are removed when a
  post is permanently deleted; group changes fire the
  `wakalang_translation_group_updated` action.
- Translation repository served through the WordPress object cache (negative
  lookups cached, writes purge touched entries); `merge_groups()` folds one
  translation group into another, refused on a same-language collision.
- Language switcher via the `[wakalang_switcher]` shortcode, the
  `wakalang_language_switcher()` / `wakalang_get_language_switcher()` template
  functions, and an editor block. The current language renders as a non-link with
  `aria-current`; output passes through `wp_kses()`.
- Language switcher display options: a `flags` mode (`name` / `flag` /
  `flag_and_name`) rendering each language's flag as a Unicode emoji from its
  locale (no bundled images, no external requests), a global show/hide toggle, and
  automatic header (`wp_body_open`) or footer (`wp_footer`) placement.
- hreflang `<link rel="alternate" hreflang="…">` tags in `wp_head` for a page's
  language variants, plus an optional `x-default`. Filterable via
  `wakalang_hreflang_entries`.
- Language-preserving links: `post_link` / `page_link` / `post_type_link` /
  `term_link`, nav-menu item URLs, `home_url()` output, and block-theme/FSE
  navigation links keep the current language's URL prefix. External links,
  anchors, `mailto:`/`tel:`, `/wp-admin/`, REST and feeds are left untouched.
- Query language scoping: archive, search and feed (RSS/Atom) queries, plus the
  core `wp-sitemap.xml` (split per language), are filtered to the current
  language via shared `posts_clauses` / `terms_clauses` SQL with cache
  invalidation.
- Taxonomy translation: categories, tags and public custom taxonomy terms carry
  per-language name/slug and link into translation groups, with a term-editor
  field and a Translations column in term lists.
- SEO title and meta description per translation, stored in WakaLang-owned post
  meta and passed to WordPress core and the Yoast / Rank Math public filters
  (their own meta is never read or written).
- Per-language site title and tagline translation (overriding `option_blogname`
  / `option_blogdescription` on the front end without going through gettext).
- Admin locale follows the URL language via `determine_locale`.
- Admin post-list language filtering and an untranslated-coverage report on the
  Tools screen, alongside rewrite flush, relationship/orphan checks and
  settings export/import.
- Markdown Renderer for GitHub cooperation: WakaLang owns the site-wide language
  spine and suppresses GFMR's own switcher via its
  `gfmr_language_switcher_enabled` hook, avoiding a duplicate switcher.
- Extension API surface for add-ons (the `wakalang_loaded` action and the add-on
  registry) plus free-edition licensing stubs and a feature gate.
- Plugin bootstrap, activation/deactivation, uninstall handling, a privacy-policy
  suggestion, and full internationalization (bundled `.pot` + Japanese `.po`/`.mo`
  and block-editor JS translations).
