You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Polyglot.js is a tiny I18n helper library written in JavaScript, made to work both in the browser and in CommonJS environments (Node). It provides a simple solution for interpolation and pluralization, based off of Airbnb’s experience adding I18n functionality to its Backbone.js and Node apps. I18n is incredibly important for us at Airbnb, as we have listings in 192 countries, and we translate our
x18n.register('en', { user: { greeting: 'Welcome %1', browser: 'You are using %{browser}.', logout: 'Logout', count: { 1: 'There is 1 user online.', n: 'There are %1 users online.' } } }); let t = x18n.t; t('user.logout'); // 'Logout' t('user.greeting', 'John'); // 'Welcome John' t('user.browser', {browser: 'Chromium'}); // 'You are using Chromium.' t('user.count').plural(1); // 'There is 1 user o
From funktio f(x) { jos (x % 2 == 0) { palauta tosi; } muuten { palauta epätosi; } } joka (muu i = 0; i < 10; i++) { konsoli.loki(i, f(i)); jos (i > 5) lopeta; } muu Terve = funktio(nimi) { tämä.nimi = nimi; }; Terve.prototyyppi = {}; Terve.prototyyppi.moi = funktio() { konsoli.loki( "Moi, " + tämä.nimi + "!" ); }; muu tere = uusi Terve("Veijo"); tere.moi(); joka (muu i johon tere) { konsoli.loki(
Gettext Style i18n for Modern JavaScript Appsvar i18n = new Jed({ locale_data: { ... } }); // Use the chainable API i18n.translate("There is one translation.") .onDomain("messages") .withContext("male") .ifPlural( num, "There are %d translations." ) .fetch( num ); // Or kick it old school var out = i18n.dnpgettext( "messages", "male", "There is one translation.", "There are %d translations.", num
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く