Customize locale prefixes and URL registration
pom_translate_locale_prefix( string $prefix, string $locale, string $base_locale ) filters one generated prefix. pom_translate_locale_prefix_map( array $prefixes, array $locales ) filters the completed locale map.
Return unique, sanitized path segments. Colliding or unstable prefixes can make routes ambiguous and require rewrite refreshes.
pom_translate_should_register_custom_url( bool $register, string $normalized_url, string $type, string $element ) decides whether a discovered URL belongs in the custom URL dictionary.
Prefer pom_translate_get_localized_url() for output changes. Prefix filters alter routing globally and require comprehensive canonical, hreflang, sitemap, selector, and redirect testing.
pom_translate_slug_before_save( ?string $slug, string $object_type, int $object_id, string $locale ) filters the final localized slug before it is stored. An integration can preserve filename-based document slugs across languages. Return a valid, unique slug for the selected object and locale; do not change unrelated objects. Return null to skip writing a slug for an object whose route is owned by another integration object, such as a retained language-specific copy. Skipping a write does not remove existing slug rows. The object type is post or term.