Skip to content

Entities 0.1.4: Translated entity names in the admin, and public URL helpers

Entities 0.1.4 shows each entity’s translated name and description in the admin, in the language the admin is viewed in, and adds helpers that build a record’s public address per language.

The entities list, the data navigator and the record form now load entities in the current language, so a translated display name, plural name and description appear instead of the main language’s. The sidebar’s list of entities is also cached per language, and changing an entity clears every language’s copy.

For developers, EntityData.public_path/3 and public_url/3 return a record’s public address in a given language, using the record’s translated slug when it has one. The URL logic the sitemap used now sits in a shared PhoenixKitEntities.UrlResolver, and the sitemap keeps putting a language prefix on every language. PhoenixKitEntities.list_entity_summaries/1 gives a light list of entities for menus.

Full release notes: Entities 0.1.4

0.1.4 · 24 April 2026

Added

  • PhoenixKitEntities.UrlResolver module — extracted URL pattern resolution and locale prefixing from SitemapSource into a shared helper
  • EntityData.public_path/3 and public_url/3 — locale-aware public URL helpers with translated-slug support (data[locale]["_slug"])
  • PhoenixKitEntities.list_entity_summaries/1 — lightweight sidebar query with :lang option
  • entities_children/2 arity on the sidebar callback for future phoenix_kit core releases that pass locale explicitly
  • PhoenixKitEntities.ActivityLog — internal helper that logs entity and entity_data mutations through the optional PhoenixKit.Activity context
  • README sections documenting multi-language support and public URL resolution
  • Unit tests for UrlResolver, public_path/3 / public_url/3, multilang field resolution, and per-locale sidebar cache invalidation

Changed

  • Admin LiveViews (Web.Entities, Web.DataNavigator, Web.DataForm) now thread the current locale through entity lookups so translated display_name / display_name_plural / description render in the admin UI
  • Sidebar entities_children caches per-locale ETS entries; invalidate_entities_cache/0 now match-deletes every locale variant instead of the single atom key
  • SitemapSource delegates URL construction to UrlResolver while keeping its “prefix every language” policy
  • resolve_language/2 and resolve_languages/2 are nil-safe so callers can pass an optional locale without a pre-check

Entities 0.1.4. Install or update: {:phoenix_kit_entities, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.