How to use @formatjs/intl - 3 common examples

To help you get started, we’ve selected a few @formatjs/intl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plgd-dev / cloud / http-gateway / web / src / containers / things / things-i18n.js View on Github external
import { defineMessages } from '@formatjs/intl'

export const messages = defineMessages({
  online: {
    id: 'things.online',
    defaultMessage: 'online',
  },
  offline: {
    id: 'things.offline',
    defaultMessage: 'offline',
  },
  name: {
    id: 'things.name',
    defaultMessage: 'Name',
  },
  types: {
    id: 'things.types',
    defaultMessage: 'Types',
  },
github plgd-dev / cloud / http-gateway / web / src / containers / app / app-i18n.js View on Github external
import { defineMessages } from '@formatjs/intl'

export const messages = defineMessages({
  loading: {
    id: 'app.loading',
    defaultMessage: 'Loading',
  },
  authError: {
    id: 'app.authError',
    defaultMessage: 'Authorization server error',
  }
})
github plgd-dev / cloud / http-gateway / web / src / components / menu / menu-i18n.js View on Github external
import { defineMessages } from '@formatjs/intl'

export const messages = defineMessages({
  dashboard: {
    id: 'menu.dashboard',
    defaultMessage: 'Dashboard',
  },
  things: {
    id: 'menu.things',
    defaultMessage: 'Things',
  },
  services: {
    id: 'menu.services',
    defaultMessage: 'Services',
  },
  notifications: {
    id: 'menu.notifications',
    defaultMessage: 'Notifications',
  },

@formatjs/intl

Internationalize JS apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.

MIT
Latest version published 13 days ago

Package Health Score

100 / 100
Full package analysis

Popular @formatjs/intl functions