Skip to main content
This release is 19 versions behind 1.2.0 — the latest version of @elsoul/fresh-i18n. Jump to latest

Built and signed on GitHub Actions

A simple and flexible internationalization (i18n) plugin for Deno's Fresh framework.

This package works with Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (0.7.1)
function useTranslation
useTranslation(namespace: string): { t: (key: string) => string; }

Provides access to translation strings within a specified namespace.

Parameters

namespace: string
  • The namespace of translations to retrieve (e.g., 'common', 'company').

Return Type

{ t: (key: string) => string; }

An object containing a function to fetch translations by key within the given namespace.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@elsoul/fresh-i18n

Import symbol

import { useTranslation } from "@elsoul/fresh-i18n";

---- OR ----

Import directly with a jsr specifier

import { useTranslation } from "jsr:@elsoul/fresh-i18n";

Add Package

npx jsr add @elsoul/fresh-i18n

Import symbol

import { useTranslation } from "@elsoul/fresh-i18n";

Add Package

yarn dlx jsr add @elsoul/fresh-i18n

Import symbol

import { useTranslation } from "@elsoul/fresh-i18n";

Add Package

pnpm dlx jsr add @elsoul/fresh-i18n

Import symbol

import { useTranslation } from "@elsoul/fresh-i18n";

Add Package

bunx jsr add @elsoul/fresh-i18n

Import symbol

import { useTranslation } from "@elsoul/fresh-i18n";