# Localization / RTL Surface Reference

This reference records the public Localization / RTL surface that is source-visible in this snapshot.

## Namespace

```vb
Nexamas.UI.Localization
```

## Public class: MASLocalizationRtl

Evidence: `MASSystem/Localization/LocalizationSystem/Gateway/MASLocalizationRtl.vb`.

### AttachPage(window)

```vb
Public Shared Function AttachPage(window As MASApplicationWindow) As IDisposable
```

Attaches the official Nexamas UI-owned Localization / RTL page to a `MASApplicationWindow`.

Behavior from source:

- validates that `window` is not `Nothing`,
- creates `MASLocalizationRtlPage`,
- builds the page through Nexamas UI-owned controls/layout,
- returns the page as `IDisposable`,
- if build fails, rolls back the partial page through its `IDisposable` lifetime, shows a MAS dialog error when dialog services are available, and throws an `InvalidOperationException` instead of returning a successful lifetime.

### AttachPage(window, page)

```vb
Public Shared Function AttachPage(window As MASApplicationWindow,
                                  page As MASApplicationLayoutPageBuilder) As IDisposable
```

Attaches official Localization / RTL content into an existing Application page-builder scope.

Behavior from source:

- validates that `window` and `page` are not `Nothing`,
- creates `MASLocalizationRtlPage`,
- builds inside the supplied page-builder scope,
- returns the page as `IDisposable`,
- if build fails, rolls back the partial page through its `IDisposable` lifetime, shows a MAS dialog error when dialog services are available, and throws an `InvalidOperationException` instead of returning a successful lifetime,
- preserves Nexamas UI ownership of culture facts, direction rows, formatting previews, expansion rows, controls, and page layout.

## Not public in this snapshot

These types exist but are not public consumer API:

| Type | Access | Reason |
|---|---|---|
| `MASLocalization` | Friend | Internal foundation gateway. |
| `MASLocalizationSnapshot` | Friend | Internal descriptive snapshot. |
| `MASLocalizationCultureEntry` | Friend | Internal culture fact row. |
| `MASLocalizationStringEntry` | Friend | Internal product string row. |
| `MASLocalizationFormatSample` | Friend | Internal format preview row. |
| `MASLocalizationExpansionSample` | Friend | Internal expansion pressure row. |
| `MASLocalizationReadinessGate` | Friend | Internal readiness gate. |
| `MASLocalizationRuntimeOwnershipAudit` | Friend | Internal runtime ownership audit. |
| `MASLocalizationRtlPage` | Friend | Internal page implementation. |

## Supported product profiles behind the public page

The internal page displays facts from the internal snapshot. The source-visible catalog includes:

| Culture | Direction | Layout flow |
|---|---|---|
| `en-US` | Left-to-right | Standard |
| `de-DE` | Left-to-right | Standard |
| `ar-SY` | Right-to-left | Mirrored |

## Reference boundary

This file documents only the public surface. It does not promote internal `Friend` types to customer API.
