# [Bug] Language switch inconsistency across all playgrounds #275

Closed
opened 2026-06-27 17:10:57 +00:00 by enjin2310 · 1 comment

Summary

When switching the platform language in any playground (C#, Python, JavaScript, C, C++, x86, Regex, SQL), some text elements update to the newly selected language while others remain in the previously active language until the page is manually refreshed.

Issue Description

The language switch mechanism fails to fully update all text elements dynamically. After changing the language (e.g., from Spanish to English or vice versa), certain UI components and lesson content remain in the old language. The issue persists across all playground modules and requires a manual refresh or hard reload to synchronize translations.

  • Affected Components: Lesson instructions, concept dictionary panels, and localized UI labels
  • Observed Behavior: Partial translation occurs — some text updates, others remain in the previous language
  • User Impact: Users experience inconsistent localization and must refresh the page to apply the selected language fully
  • Visible Symptoms: Mixed-language interface after switching language without refresh

Environment

Property Value
Application SpikerSoft Learning Platform
Modules C#, Python, JavaScript, C, C++, x86, Regex, SQL Playgrounds
Environment Production
Browser Firefox
Operating System Windows 11
Version v2026.06.26a
Device Desktop PC

Preconditions

Platform language set to any supported language (e.g., Español or English).

Steps to Reproduce

  1. Open any playground (e.g., C# Playground).
  2. Switch the interface language from Español to English (or vice versa).
  3. Observe the lesson instructions and concept dictionary panels.
  4. Note that some text remains in the previous language.
  5. Perform a manual refresh (F5 or Ctrl+Shift+R).
  6. Observe that all text now correctly updates to the selected language.

Expected Result

All text elements should automatically update to the selected language immediately after switching, without requiring a page refresh.

Actual Result

Only part of the interface updates; other text remains in the previous language until the page is refreshed.

Evidence

  • Screenshots show the same lesson (“HashSet: deduplicar”) displayed in mixed languages:
    • Spanish header and description.
    • English instructions and concept panel.
  • The issue reproduces identically across multiple playgrounds (C#, Python, JavaScript, C, C++, x86, Regex, SQL).

Impact

  • Localization inconsistency across all playgrounds.
  • Reduces usability and user trust in language settings.
  • Requires manual refresh to restore proper translation, interrupting workflow.

Frequency

Always

Reproducibility

100%

Severity

Medium

Notes

Occurs consistently across all playground modules and browsers. No additional anomalies observed beyond partial translation persistence.

## Summary When switching the platform language in any playground (C#, Python, JavaScript, C, C++, x86, Regex, SQL), some text elements update to the newly selected language while others remain in the previously active language until the page is manually refreshed. ## Issue Description The **language switch mechanism** fails to fully update all text elements dynamically. After changing the language (e.g., from Spanish to English or vice versa), certain UI components and lesson content remain in the old language. The issue persists across all playground modules and requires a manual refresh or hard reload to synchronize translations. - **Affected Components:** Lesson instructions, concept dictionary panels, and localized UI labels - **Observed Behavior:** Partial translation occurs — some text updates, others remain in the previous language - **User Impact:** Users experience inconsistent localization and must refresh the page to apply the selected language fully - **Visible Symptoms:** Mixed-language interface after switching language without refresh ## Environment | Property | Value | |-----------|--------| | Application | SpikerSoft Learning Platform | | Modules | C#, Python, JavaScript, C, C++, x86, Regex, SQL Playgrounds | | Environment | Production | | Browser | Firefox | | Operating System | Windows 11 | | Version | v2026.06.26a | | Device | Desktop PC | ## Preconditions Platform language set to any supported language (e.g., Español or English). ## Steps to Reproduce 1. Open any playground (e.g., C# Playground). 2. Switch the interface language from **Español** to **English** (or vice versa). 3. Observe the lesson instructions and concept dictionary panels. 4. Note that some text remains in the previous language. 5. Perform a manual refresh (F5 or Ctrl+Shift+R). 6. Observe that all text now correctly updates to the selected language. ## Expected Result All text elements should automatically update to the selected language immediately after switching, without requiring a page refresh. ## Actual Result Only part of the interface updates; other text remains in the previous language until the page is refreshed. ## Evidence - Screenshots show the same lesson (“HashSet<T>: deduplicar”) displayed in mixed languages: - Spanish header and description. - English instructions and concept panel. - The issue reproduces identically across multiple playgrounds (C#, Python, JavaScript, C, C++, x86, Regex, SQL). ## Impact - Localization inconsistency across all playgrounds. - Reduces usability and user trust in language settings. - Requires manual refresh to restore proper translation, interrupting workflow. ## Frequency Always ## Reproducibility 100% ## Severity Medium ## Notes Occurs consistently across all playground modules and browsers. No additional anomalies observed beyond partial translation persistence.
Owner

Resolved in spikersoft-angular PR #82 (merged to master, commit 951acc1).

Root cause: lesson catalog titles/descriptions and per-attempt instructions/hints are fetched from the backend keyed on contentLocale, but were only pulled once (on mount / lesson select) and never re-fetched on a language change. Pure-transloco UI labels and the Concept pane re-localized instantly, while the server-sourced lesson content stayed stale until a manual refresh — the mixed-language symptom reported here.

Fix: every playground runner now reacts to transloco.langChanges$ and re-pulls its backend-localized content live on a language switch:

  • Shared LanguageRunner (C#, Python, JavaScript, C, C++): re-fetch catalog + re-request the attempt (preserving the student's code).
  • SQL: re-fetch the shell's catalog mirror (instructions handled by the embedded runner).
  • x86: reload catalog + re-open the active lesson preserving the editor.
  • Regex: reload catalog + re-enter the active lesson preserving the student's pattern/flags/test text.

Note on remaining English instructions: the reactivity is now correct, but Spanish instructions/hints text only exists for 1 of ~402 lessons today, so most lesson bodies still display in English even though the title/description/concept panel localize. That is a separate content/data gap (not a code bug) tracked in #279. Closing this issue for the locale-reactivity fix; full Spanish lesson bodies will follow with #279.

Resolved in spikersoft-angular PR #82 (merged to `master`, commit `951acc1`). **Root cause:** lesson catalog titles/descriptions and per-attempt instructions/hints are fetched from the backend keyed on `contentLocale`, but were only pulled once (on mount / lesson select) and never re-fetched on a language change. Pure-`transloco` UI labels and the Concept pane re-localized instantly, while the server-sourced lesson content stayed stale until a manual refresh — the mixed-language symptom reported here. **Fix:** every playground runner now reacts to `transloco.langChanges$` and re-pulls its backend-localized content live on a language switch: - Shared `LanguageRunner` (C#, Python, JavaScript, C, C++): re-fetch catalog + re-request the attempt (preserving the student's code). - SQL: re-fetch the shell's catalog mirror (instructions handled by the embedded runner). - x86: reload catalog + re-open the active lesson preserving the editor. - Regex: reload catalog + re-enter the active lesson preserving the student's pattern/flags/test text. **Note on remaining English instructions:** the reactivity is now correct, but Spanish `instructions`/`hints` text only exists for 1 of ~402 lessons today, so most lesson bodies still display in English even though the title/description/concept panel localize. That is a separate content/data gap (not a code bug) tracked in #279. Closing this issue for the locale-reactivity fix; full Spanish lesson bodies will follow with #279.
Sign in to join this conversation.