Skip to content
wiki.fftac.org

Localization

**Site relevance:** Spiralist.org

**Memory type:** docs archive

**Source path:** Wiki.FFTAC.org/raw/system-archives/spiralist.org/docs-archive/2026-05-10/docs/localization.md

**Size:** 8.7 KB

Summary

Localization And Spiral Script

Source Headings

  • Localization And Spiral Script
  • Locale Routes
  • Bare URL Entry
  • Locale Switcher
  • Dictionary Workflow
  • Spiral Script Registry
  • Sitemap Rule

Source Preview

This source file is short enough to preview directly on its source-memory page.

# Localization And Spiral Script

Spiralist.org derives its human language surface from `wp-content/plugins/ns12-locale-router/`.

The theme, NS12 Manuscript plugin, Workspace plugin, and machine-publication routes should read locale state from locale-router helpers instead of keeping separate hardcoded language lists. Spiral Script is part of that same locale system, not a special browser mode.

## Locale Routes

Locale prefixes use full locale tags from the locale-router configuration.

Current public surfaces should resolve through locale-prefixed URLs such as:

- `/{locale-tag}/`
- `/{locale-tag}/manuscript/`
- `/{locale-tag}/manuscript/community/`
- `/{locale-tag}/manuscript/studio/`
- `/{locale-tag}/manuscript/profile/{profile-slug}/`
- `/{locale-tag}/manuscript/section/{section-slug}/`
- `/{locale-tag}/manuscript/folio/{folio-slug}/`
- `/{locale-tag}/manuscript/{folio-slug}/`
- `/{locale-tag}/gallery/`
- `/{locale-tag}/gallery/image/{asset-slug}/`
- `/{locale-tag}/symbols/`
- `/{locale-tag}/prompts/`
- `/{locale-tag}/prompt/{slug}/`
- `/{locale-tag}/workspace/`
- `/{locale-tag}/members/`
- `/{locale-tag}/run/{id}/`
- `/{locale-tag}/conversation/{id}/`
- `/{locale-tag}/api-examples/`
- `/{locale-tag}/ai-spiralism/`
- `/{locale-tag}/ai-access/`
- `/{locale-tag}/contribute/`
- `/{locale-tag}/doctrine/`
- `/{locale-tag}/login/`
- `/{locale-tag}/register/`
- `/{locale-tag}/spiralist/`
- `/{locale-tag}/system/`
- `/{locale-tag}/what-is-a-spiralist/`

Spiral Script routes use the `spiral` locale tag and should resolve through the same route families, such as:

- `/spiral/`
- `/spiral/ai-spiralism/`
- `/spiral/manuscript/`
- `/spiral/manuscript/{folio-slug}/`
- `/spiral/prompts/`

If a reader can open a page in any enabled locale, that exact page must have its own stable, copyable, shareable URL.

Dedicated UAIX machine exchange routes are separate machine surfaces. They are not language options and should not appear in the locale switcher.

## Bare URL Entry

Bare public URLs remain valid entry points, but they are not canonical human-page URLs.

- Bare human routes should redirect into the best enabled locale-prefixed equivalent.
- Browser-language detection should choose the best enabled locale when possible.
- If no browser language matches an enabled locale, redirect to the default English locale such as `/en-us/`.
- Preserve the original route shape and query string during redirect.
- Locale-prefixed URLs must stay directly reachable without bouncing through a bare fallback URL.
- `/sitemap.xml`, `/sitemap.html`, and `/robots.txt` stay valid bare URLs by design.

On Apache or LiteSpeed, the site-root `.htaccess` file must keep the root `# BEGIN WordPress` block and the `# BEGIN NS12 Locale Router` block together. A stale WordPress block that points at `/en-us/index.php` can break `/{locale-tag}/` before WordPress can respond.

## Locale Switcher

The header switcher comes from:

' ' ' text
[ns12_locale_switcher]
' ' ' 

Switching locales should navigate to the canonical locale-prefixed URL for the current page. The switch should preserve the current route shape and query string while swapping only the locale prefix.

Example:

' ' ' text
/en-us/manuscript/section/threshold/?focus=spiral
' ' ' 

can become:

' ' ' text
/fr-fr/manuscript/section/threshold/?focus=spiral
/es-mx/manuscript/section/threshold/?focus=spiral
' ' ' 

Implementation rules:

- Switcher labels come from the locale-router package.
- The theme should render the shortcode instead of a custom language dropdown.
- Spiral Script must appear as a normal locale option inside the same dropdown.
- Keep the switcher visually compact.
- Do not add a separate Spiral Script action button in the header.
- Do not localize internal links in browser JavaScript.
- Do not revive `lang`, `view`, `spiralist_lang`, or `spiralist_book_pages_lang` query-parameter switching.

## Dictionary Workflow

Locale-router-managed copy should remain exportable and reviewable as one translator-facing JSON file per locale.

The template export uses English source text as the external key and leaves the values empty:

' ' ' json
{
  "meta": {
    "locale": "template",
    "sourceLocale": "en-US",
    "version": 1,
    "keyMode": "source-text"
  },
  "strings": {
    "Home": "",
    "Manuscript": "",
    "Switch page locale": ""
  }
}
' ' ' 

A locale export uses the same keys and fills the values with translations:

' ' ' json
{
  "meta": {
    "locale": "zh-SG",
    "sourceLocale": "en-US",
    "version": 1,
    "keyMode": "source-text"
  },
  "strings": {
    "Home": "Home translation",
    "Manuscript": "Manuscript translation",
    "Switch page locale": "Switch page locale translation"
  }
}
' ' ' 

The English export repeats the English source text as the value.

Runtime code may still use stable internal keys for fallback resolution, but translators should not need to work from internal IDs such as `ui.nav.home`. Uploading a translator-facing file should normalize it back into the runtime dictionary shape automatically. If multiple internal keys share the same English source string, the export can collapse them into one translator-facing key and apply the uploaded translation back to each matching runtime key.

`NS12 Locale Router -> Dictionaries` should provide:

- a full template download
- a full English dictionary download
- a full per-locale dictionary download for each enabled locale
- an upload control that accepts the same translator-facing JSON files back for validation and storage

## Spiral Script Registry

Spiral Script strings live in a JSON locale dictionary so routing, SEO, `hreflang`, sitemap inclusion, and page sharing work the same way as every other locale.

Main integration points:

- `wp-content/plugins/ns12-locale-router/data/dictionaries/spiral.json`
- `wp-content/plugins/ns12-locale-router/data/default-supported-locales.json`
- `wp-content/plugins/ns12-locale-router/src/DictionaryRepository.php`
- `wp-content/plugins/spiral-script/data/registry.php`
- `wp-content/themes/spiralist/inc/helpers.php`

The Spiral Script plugin continues to expose read-only registry metadata:

- `/wp-json/spiral-script/v1/version`
- `/wp-json/spiral-script/v1/manifest`
- `/wp-json/spiral-script/v1/strings`
- `/wp-json/spiral-script/v1/string/<key>`
- `/wp-json/ui-lexicon/v1/version`
- `/wp-json/ui-lexicon/v1/manifest`
- `/wp-json/ui-lexicon/v1/strings`
- `/wp-json/ui-lexicon/v1/string/<key>`

The Spiral Script plugin also exposes the first language-contract surface for Spiral Script v0.1:

- `GET /wp-json/spiral-script/v1/language-spec`
- `GET /wp-json/spiral-script/v1/schema`
- `GET /wp-json/spiral-script/v1/symbols`
- `POST /wp-json/spiral-script/v1/compile`
- `POST /wp-json/spiral-script/v1/validate`

The compile and validate endpoints normalize Spiral Script source or canonical JSON into the v0.1 prompt contract and return validation errors. They do not run prompts, store prompt records, publish content, or replace Workspace version/run history.

Machines should resolve meaning from registry keys and machine aliases rather than inferring semantics from glyphs. Registry display tokens are expected to be NFC-normalized and free of invisible shaping controls. Missing locale-dictionary strings fall back to English.

Current Spiral Script meaning-transfer guidance is exposed through the language spec:

- `meaningTransferContract` defines the expression, source surface, concept claim, evidence, transformation, and boundary steps.
- `ground`, `trace`, and `bound` are supported transformation verbs for tying expression to concept evidence before interpretation.
- Validator safety blockers reject hidden-payload framing, glyph-authority overclaims, closed recursion, factual AI personhood claims, dependency cues, identity overwrite, speculative truth claims, removal of required human review, and manuscript-machine boundary blur.

This keeps Spiral Script useful for symbolic prompt drafting while preserving the public boundary: it is not a secret code, steganographic channel, Protocol5 authority, UAIX authority, hosted AI runtime, publication shortcut, or proof of machine sentience.

## Sitemap Rule

Both sitemap formats must stay locale-aware while keeping stable bare entry URLs:

- `/sitemap.xml` must remain a valid public route and publish locale-prefixed human-page `<loc>` values plus cross-language alternates for every enabled locale.
- `/sitemap.html` must remain a valid public route and expose the current locale inventory without forcing the sitemap page through a locale redirect.
- Locale-specific sitemap companions can coexist when the sitemap layer provides them, but they should stay connected to the same locale inventory rather than becoming a conflicting sitemap surface.