---
title: "Verify locale switching retains an in-progress draft"
description: "Test switching an application locale while editing a sandbox draft, checking that only interface language changes and unsaved content remains intact."
canonical_url: "https://vostride.com/agent-library/localization/locale-switch-keeps-draft.md"
md_url: "https://vostride.com/agent-library/localization/locale-switch-keeps-draft.md"
content_kind: "recipe"
topic: "localization"
---

# Verify locale switching retains an in-progress draft

Test switching an application locale while editing a sandbox draft, checking that only interface language changes and unsaved content remains intact.

## Risk

A locale switch may remount the entire application and erase draft state or translate user-authored text. Keep interface labels and user content separate in the expected outcomes and verify a final persisted record.

## Fixtures

- An owned sandbox editor with a documented locale switch available during editing and two supported interface languages.
- A disposable account and draft containing a unique title, multiline body, selected category, and numeric amount.
- A read-only draft or record oracle and a product requirement stating how unsaved work should survive language changes.

## Steps

1. Start the draft in the first locale and verify all text, category, and amount values before changing language.
2. Switch to the second locale through the product setting and verify recognizable navigation labels change to their approved translations.
3. Return to the draft and verify the title and body retain their exact user-authored wording, while the selected category keeps its underlying meaning.
4. Save the draft in the second locale and verify the reopened detail contains the original content with locale-appropriate amount formatting.
5. Switch back to the first locale, reopen the record, and verify its identifier and values; inspect the independent oracle and verify one record with unchanged body and numeric amount.

## Expected results

- Interface language changes while user-authored content remains unchanged.
- The category selection preserves its underlying identifier across translated labels.
- One persisted record contains the original draft values independent of display locale.

## False-pass traps

- A draft title can survive while an unobserved category resets to its default.
- Translating the saved user body would be data mutation, not a successful interface locale switch.

## Cleanup

- Delete the sandbox record and restore the original account locale.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa test](/docs/agent-qa/configuration/test.md)

- [Localization QA recipes](/agent-library/localization.md)
- [Software factory QA library](/agent-library.md)
