Browse documentation

setLang

Selects which dictionary `t` resolves.

Table of contents

Category

Value

Import

js
import { setLang } from "valyrian.js/translate";

Public signature

ts
(newLang: string): void

Parameters

ts
newLang: string

Result

ts
void

Observable effects

Changes the active translation language through the configured storage strategy.

Errors

Throws when the requested language has no configured dictionary.