Skip to content

tinialabs/next-i18n-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-i18n-content npm version license downloads

Features:

  • Dynamic languages Load locales from language files in content/locales folder

Table of contents

Installation

npm install next-i18n-content next-compose-plugins

Add the plugin with next-compose-plugins to your Next.js configuration:

// next.config.js
const withPlugins = require("next-compose-plugins");

module.exports = withPlugins([
  require("next-i18n-content")
  // your other plugins here
]);

Usage

Place locale files in your content/local folders. Include optional translations if using the Novela or equivalent theme.

# en-US.yml
---
language:
  default: true
  path: en
  locale: en-us
  siteLanguage: en
  ogLang: en_US
translations:
  site: 
    title: Connect with KARLA
    description: Telehealth support face to face with a counselor + digital support through our application, Karla.
    hero:
      title: Telehealth support face to face with a counselor + digital support through our application, Karla. 
      maxWidth: 652
  Articles:
    Section:
      100: About the program
      500: Notes about resilience
    Show articles in Tile grid: Show articles in Tile grid
    Show articles in Row grid: Show articles in Row grid
  Paginator:
    Next: Next
    of: of
    Prev: Prev
  Slipway:
    tag: Tag
    tags: Tags
    note: Note
    notes: Notes
    was: was
    were: were
    recent: Recent
    allTags: All tags
    entries: entries
    min read: min read
    Feature: Feature
    by: by
    in: in
    More notes from: More notes from
    Notes authored by: Notes authored by
    Choose a specialist: Choose a specialist
    Request appointment: Request appointment

License

Licensed under the MIT license.

© Copyright Guy Barnard and Tinia Labs contributors

About

Load locales directly from /content/locales folder

Resources

License

Stars

Watchers

Forks

Packages

No packages published