Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/freshlate/freshlate/translation.ts>LanguageService

A translation plugin for Deno Fresh
Go to Latest
class LanguageService
import { LanguageService } from "https://deno.land/x/freshlate@0.1.2/freshlate/translation.ts";

Constructors

new
LanguageService(
languages?: { [key: string]: Record<string, unknown>; },
fallback_language?,
fallback_key?,
)

Properties

fallback_key: string
fallback_language: string
languages: { [key: string]: { [key: string]: string; }; }

Methods

addLanguage(code: string, lang: Record<string, unknown>)
allSupported(): string[]
isSupported(code: string): boolean
t(key: string, opts?: Record<string, unknown>)