@emmert/resources

A framework for importing translatable resources into your app

Usage no npm install needed!

<script type="module">
  import emmertResources from 'https://cdn.skypack.dev/@emmert/resources';
</script>

README

Resources

Localized resources for an application

  • Strings
  • Templates

Quick Start

Step 1: Create context from @emmert/context

import { Context } from '@emmert/context'

const appContext = new Context()

appContext.use(
    resourcesMiddleware({
        // ...Settings (see below)
    }),
)

Options

defaultLanguage: the default language to use when no language header is provided

resources: a map of resources (or factory to generate a map of resources)