ludic/packages/ludic.i18n/state.ludic
2026-09-25 14:02:21 +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 }