ludic/packages/ludic.i18n/state.ludic
Orkuncakilkaya 19fcf60599 wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run
ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:31:34 +03:00

18 lines
761 B
Text

# state.ludic - the languages found, the one in use, and the loaded file's lookups
const CACHE_MAX: int = 4000
const CAPS: int = 16
export function i18n_on(i18n_st: I18nState) -> bool { return i18n_st.on }
export function i18n_current(i18n_st: I18nState) -> string { return i18n_st.cur }
export function i18n_font_now(i18n_st: I18nState) -> string { return i18n_st.font_now }
export function i18n_exact_count(i18n_st: I18nState) -> int {
if i18n_st.out == null { return 0 }
return len(i18n_st.out)
}
export function i18n_pattern_count(i18n_st: I18nState) -> int { return i18n_st.pat_n }
# the overlay's own font, as the overlay was opened with it
export function i18n_font_base(i18n_st: mut I18nState, path: string) -> void { i18n_st.font_now = path }