{"id":13526852,"url":"https://github.com/i18next/i18next-node-fs-backend","last_synced_at":"2025-04-06T06:13:22.658Z","repository":{"id":57270441,"uuid":"45398418","full_name":"i18next/i18next-node-fs-backend","owner":"i18next","description":"[deprecated] can be replaced with i18next-fs-backend","archived":false,"fork":false,"pushed_at":"2020-04-20T13:16:29.000Z","size":107,"stargazers_count":64,"open_issues_count":8,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T04:09:20.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/i18next/i18next-fs-backend","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i18next.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-02T14:10:08.000Z","updated_at":"2025-03-15T20:58:09.000Z","dependencies_parsed_at":"2022-09-02T09:51:53.488Z","dependency_job_id":null,"html_url":"https://github.com/i18next/i18next-node-fs-backend","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18next%2Fi18next-node-fs-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18next%2Fi18next-node-fs-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18next%2Fi18next-node-fs-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18next%2Fi18next-node-fs-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i18next","download_url":"https://codeload.github.com/i18next/i18next-node-fs-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441059,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:35.928Z","updated_at":"2025-04-06T06:13:22.630Z","avatar_url":"https://github.com/i18next.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# DEPRECATED\n\nCan be replaced with: [i18next-fs-backend](https://github.com/i18next/i18next-fs-backend)\n\n---\n\n# Introduction\n\n[![Travis](https://img.shields.io/travis/i18next/i18next-node-fs-backend/master.svg?style=flat-square)](https://travis-ci.org/i18next/i18next-node-fs-backend)\n[![Coveralls](https://img.shields.io/coveralls/i18next/i18next-node-fs-backend/master.svg?style=flat-square)](https://coveralls.io/github/i18next/i18next-node-fs-backend)\n[![npm version](https://img.shields.io/npm/v/i18next-node-fs-backend.svg?style=flat-square)](https://www.npmjs.com/package/i18next-node-fs-backend)\n[![David](https://img.shields.io/david/i18next/i18next-node-fs-backend.svg?style=flat-square)](https://david-dm.org/i18next/i18next-node-fs-backend)\n\nThis is a i18next backend to be used node.js. It will load resources from filesystem. Right now it supports following filetypes:\n\n- .json\n- .json5\n- .yml\n- .cson\n\n# Getting started\n\nSource can be loaded via [npm](https://www.npmjs.com/package/i18next-node-fs-backend).\n\n```\n$ npm install i18next-node-fs-backend\n```\n\nWiring up:\n\n```js\nvar i18next = require(\"i18next\");\nvar Backend = require(\"i18next-node-fs-backend\");\n\ni18next.use(Backend).init(i18nextOptions);\n```\n\nAs with all modules you can either pass the constructor function (class) to the i18next.use or a concrete instance.\n\n## Backend Options\n\n```js\n{\n  // path where resources get loaded from\n  loadPath: '/locales/{{lng}}/{{ns}}.json',\n\n  // path to post missing resources\n  addPath: '/locales/{{lng}}/{{ns}}.missing.json',\n\n  // jsonIndent to use when storing json files\n  jsonIndent: 2,\n\n  // custom parser\n  parse: function(data) { return data; }\n}\n```\n\n**hint** {{lng}}, {{ns}} use the same prefix, suffix you define in interpolation for translations!!!\n\nOptions can be passed in:\n\n**preferred** - by setting options.backend in i18next.init:\n\n```js\nvar i18next = require(\"i18next\");\nvar Backend = require(\"i18next-node-fs-backend\");\n\ni18next.use(Backend).init({\n  backend: options\n});\n```\n\non construction:\n\n```js\nvar Backend = require(\"i18next-node-fs-backend\");\nvar backend = new Backend(null, options);\n```\n\nby calling init:\n\n```js\nvar Backend = require(\"i18next-node-fs-backend\");\nvar backend = new Backend();\nbackend.init(options);\n```\n\n---\n\n\u003ch3 align=\"center\"\u003eGold Sponsors\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://locize.com/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/i18next/i18next/master/assets/locize_sponsor_240.gif\" width=\"240px\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi18next%2Fi18next-node-fs-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi18next%2Fi18next-node-fs-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi18next%2Fi18next-node-fs-backend/lists"}