Skip to content

Function: currentValidationLanguage() ​

currentValidationLanguage(): string | undefined

The validation language of the code running, set by runInValidationLanguage().

Returns ​

string | undefined

The language tag, or undefined outside of runInValidationLanguage().

Example ​

typescript
import {currentValidationLanguage, runInValidationLanguage} from 'lakutata'

console.log(currentValidationLanguage()) //undefined
runInValidationLanguage('ja', (): void => {
    console.log(currentValidationLanguage()) //ja
})

Released under the MIT License.