Fluent for Deno. Port of @the-moebius/fluent.

Overview

Fluent for Deno [better_fluent]

Deno port of the-moebius/fluent

Better Fluent integration for TypeScript/JavaScript. See the original repository for more information.

Usage

import { Fluent } from "https://deno.land/x/better_fluent/mod.ts";

// Instantiate a Fluent class
const fluent = new Fluent();

// Add translations
await fluent.addTranslation({
  locales: "en",
  source: `
-brand-name = Super Project

welcome =
  Welcome, {$name}, to the {-brand-name}!
  Your balance is: {
    NUMBER($value, maximumFractionDigits: 2)
  }
  You have { NUMBER($applesCount) ->
    [0] no apples
    [one] {$applesCount} apple
    *[other] {$applesCount} apples
  }`,
});

const output = fluent.translate("ru", "welcome", {
  name: "Slava",
  value: 100.12345,
  applesCount: 5,
});

console.log(output);

See more examples here.

Credits

You might also like...

TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy

Atlas SDK atlas_sdk is a TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy Links Docs Import Replace LATEST_VERSION with current latest versi

Dec 26, 2022

Deno bindings for yoga, using Deno FFI.

deno_yoga Deno bindings for yoga, using Deno FFI. Usage flags: --allow-ffi: Requires ffi access to "yogacore.dll", "libyogacore.so", "libyogacore.dyli

Feb 11, 2022

🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Dec 10, 2022

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Dec 12, 2022

deno-ja (Deno Japanese community) showcase

Showcase Deno本家よりも気軽に作ったものを公開できるようなShowcaseです。 スクリーンショットの撮影方法 短めのidを決めていただいて、下記のようにスクリプトを実行してください。 deno task screenshot [url] [id] ※エラーが出る場合は、下記を実行してみ

Oct 28, 2022

A command-line tool to manage Deno scripts installed via deno install

🏞️ nublar nublar is a command-line tool to manage your scripts installed via deno install. 🛳️ Installation deno install --allow-read --allow-write -

Dec 26, 2022

Live port of Lark's standalone parser to Javascript

Lark.js Generate LALR(1) parsers in Javascript Lark is a popular parsing toolkit for Python. This project is a live port of the Lark standalone parser

Nov 19, 2022

fxDeviantArt.js - a port of fxDeviantArt to JavaScript

fxDeviantArt.js This is a port of fxDeviantArt to JavaScript. Written in TypeScript and compiled to a JS file. Original code is written by Robin Unive

Feb 18, 2022

A port of bitcoin-core that will (over time) become TS friendly.

bitcoin-core A modern Bitcoin Core REST and RPC client to execute administrative tasks, multiwallet operations and queries about network and the block

Nov 22, 2022
Owner
Dunkan
console.log(3446)
Dunkan
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
solid material ui port (ported from blazor port)

solid-material-ui solid material ui port (porting from blazor port) In preparation for solid hack Turbo Mono-repository is used for component package

skclusive 18 Apr 30, 2022
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
Grm is an improved Deno port of GramJS, written in TypeScript

Grm is an improved Deno port of GramJS, written in TypeScript. GramJS is a popular MTProto API Telegram client library written in JavaScript for Node.js and browsers, with its core being based on Telethon.

Dunkan 26 Dec 31, 2022
Improved Deno port of GramJS — a MTProto API Telegram client library.

Warning Considered as unstable. But, most of the commonly used features are working as expected. Grm Grm is an improved Deno port of GramJS, written i

Dunkan 26 Dec 31, 2022
Unofficial port of the Sentry SDK for JavaScript to Deno.

Sentry_deno This is an unofficial port of the Sentry SDK (@sentry/browser) to Deno. import * as Sentry from "https://deno.land/x/sentry_deno/main.ts";

Geert-Jan Zwiers 11 Aug 11, 2022
Deno port of Gnome libraries (such as Gtk).

Deno GI Deno port of Gnome libraries (such as Gtk). Early Stage and Unstable Usage You must specify --allow-ffi and --unstable flags to run your progr

Ahmadreza Gilak 20 Dec 24, 2022
🦕 Deno port of Microsoft/vscode-textmate: A library that helps tokenize text using TextMate grammars.

TextMate A library that helps tokenize text using TextMate grammars. Deno port of Microsoft/vscode-textmate. See original license here. An interpreter

Dunkan 2 Sep 13, 2022
This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Bruno Bernardino 15 Dec 3, 2022