String extraction is the practice of identifying user-facing text in code and moving it into translatable resources. For identity products, it prevents hard-coded labels, error messages, and placeholders from bypassing translation workflows and creating inconsistent user experiences.
What String Extraction Solves in Software Localization
String extraction separates user-visible text from source code so it can be translated, reviewed, and updated independently. In identity products, that keeps prompts, labels, and validation messages consistent across languages and avoids shipping hard-coded text that bypasses localization workflows.
Why String Extraction Matters for Product Quality
The core value of string extraction is that it makes text a managed asset rather than an embedded code detail. That improves maintainability because copy changes do not require code edits, and it improves product quality because translated output can be verified in one place instead of scattered across files and features.
It also reduces the risk of inconsistent terminology. A login flow, consent screen, or account settings page can lose clarity fast if the same concept is translated differently in different screens or if fallback text leaks into production.
How String Extraction Works in Practice
In a typical workflow, developers mark or extract literals into resource files, then reference those keys from the application. Translators work from the resource layer, not the codebase, which creates a cleaner separation between software behaviour and language content.
The practice usually extends beyond visible labels to placeholders, error strings, tooltips, and helper text. Those short messages often matter most because they shape whether users can complete sign-in, recover accounts, or understand a permission prompt.
Well-run localization pipelines also account for plural forms, interpolation, and text expansion. Languages differ in grammar and length, so extraction is only useful when the surrounding application can render translated strings correctly without breaking layout or meaning.
Where String Extraction Breaks Down
String extraction fails when teams leave user-facing text embedded in components, templates, or error handlers. The result is partial translation coverage, duplicated wording, and difficult-to-audit text that can slip through release processes unnoticed.
It can also fail when keys are poorly named or when developers reuse one string too broadly. That creates fragile dependencies between unrelated screens and makes later copy changes risky, especially in products with regulated terminology or security-sensitive flows.
Risk and Threat Considerations
Hard-coded text in a multilingual product creates quality and trust risk because users may see inconsistent or untranslated messages at the exact moment they need clear guidance. In identity and account flows, that can confuse verification, recovery, or consent steps and increase support burden.
Failure mechanism: The application bypasses its localization pipeline, so text that should be translated remains embedded in code, varies by build path, or diverges from the approved resource set.
Impact: Users may misinterpret critical prompts, security messages, or validation feedback, which can degrade usability, slow completion, and weaken confidence in the product experience.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS and OWASP SAMM set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| ISO/IEC 27001:2022 | A.8.6 — Capacity management | String extraction supports maintainable application content and controlled change processes. |
| A.8.32 — Change management | Localized strings and resource files require controlled updates to prevent inconsistent user-facing content. | |
| Recommendation — Standardise text externalization and review it through controlled change management. Route translation and copy-key updates through formal change control. | ||
| OWASP ASVS | V13 — Configuration | Externalized strings are application configuration that should be managed separately from code. |
| Recommendation — Store translatable text in managed resources instead of hard-coding it in application logic. | ||
| OWASP SAMM | N/A — Architecture Review | String extraction is a software-delivery practice that benefits from repeatable review of localization handling. |
| Recommendation — Bake localization review into development and release practices for user-facing text. | ||
Practitioner Guidance
What to watch for: Treat extraction as complete only when all user-facing text, including errors, placeholders, and edge-case messages, is externalized into the same localization workflow. Mixed patterns are a common sign that translations will drift over time.
Governance implication: Use a single ownership model for copy keys, translation updates, and review of product terminology so language changes do not become ad hoc code changes. That keeps localization, product, and engineering aligned on what text is authoritative.
Related resources from NHI Mgmt Group
- What is the difference between string-based path validation and realpath-based containment checks during extraction?
- What breaks when consent disclosure is not encoded clearly in the TC string?
- What do teams get wrong about prompt extraction tests?
- What should teams do when legitimate automation becomes an extraction channel?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org