Skip to main content
Module

x/freshlate/mod.ts>Options

A translation plugin for Deno Fresh
Go to Latest
interface Options
Re-export
import { type Options } from "https://deno.land/x/freshlate@0.2.2/mod.ts";

Properties

selfURL: string

The import.meta.url of the module defining these options.

languages: Record<string, Record<string, string>>

Preallocated languages to use for translations. This is useful if you want to preallocate languages on the server and then hydrate them on the client. If this is not provided, the client will try to get the language from the provided fetch_url.

optional
fetch_url: string

Optional location to attempt fetching a translation from

optional
fallback_language: string

The fallback language to use if the browser's language is not supported/not set. If this is not set, the fallback language will be the first language in the languages object.