{"id":18962028,"url":"https://github.com/lamualfa/dn-i18next-mongo-backend","last_synced_at":"2026-05-08T17:35:23.119Z","repository":{"id":114730579,"uuid":"266081594","full_name":"lamualfa/dn-i18next-mongo-backend","owner":"lamualfa","description":"i18next mongodb backend https://www.i18next.com/ - Only for Deno 🦖","archived":false,"fork":false,"pushed_at":"2020-10-26T14:45:14.000Z","size":259,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T04:52:54.885Z","etag":null,"topics":["deno","i18next","i18next-back","mongodb"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lamualfa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T10:19:55.000Z","updated_at":"2020-10-26T14:45:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"12b03fb4-3e39-49eb-b100-855f1b465b08","html_url":"https://github.com/lamualfa/dn-i18next-mongo-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fdn-i18next-mongo-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fdn-i18next-mongo-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fdn-i18next-mongo-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fdn-i18next-mongo-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamualfa","download_url":"https://codeload.github.com/lamualfa/dn-i18next-mongo-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239958313,"owners_count":19724926,"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":["deno","i18next","i18next-back","mongodb"],"created_at":"2024-11-08T14:14:58.856Z","updated_at":"2026-04-01T19:30:15.687Z","avatar_url":"https://github.com/lamualfa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![ci](https://github.com/lamualfa/dn-i18next-mongo-backend/workflows/ci/badge.svg)\n[![License](https://badgen.net/github/license/lamualfa/dn-i18next-mongo-backend?color=purple)](LICENSE)\n[![Maintainability](https://api.codeclimate.com/v1/badges/759802f4d5ecf5ecd167/maintainability)](https://codeclimate.com/github/lamualfa/dn-i18next-mongo-backend/maintainability)\n[![Release](https://badgen.net/badge/release/v0.0.1/blue)](https://github.com/lamualfa/dn-i18next-mongo-backend)\n\n## Are you a NodeJS user? If `true`, we provide the same library for NodeJS. See: [Mongo Backend for NodeJS](https://github.com/lamualfa/i18next-node-mongo-backend)\n\n# Integrate [i18next](https://github.com/i18next/i18next) with [MongoDB](https://www.mongodb.com/) in Deno 🦖\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"asset/banner.png\"/\u003e\n\u003c!-- Inspired from https://github.com/grikomsn --\u003e\n\u003c/div\u003e\n\n# Introduction\n\nThis is a [i18next](https://github.com/i18next/i18next) backend to be used in Deno. It will load resources from a [MongoDB](https://www.mongodb.org) database.\n\n# Usage\n\n\u003e **IMPORTANT**: Because we use `mongo@v0.7.0` as a driver to connect to MongoDB, please also follow the guidelines and requirements of the library. See [Mongo in Deno](https://deno.land/x/mongo#important) for further information.\n\n```ts\nimport i18next from 'https://deno.land/x/i18next/index.js'\nimport { Backend } from 'https://deno.land/x/i18next_mongo_backend/mod.ts'\n\ni18next.use(Backend).init({\n  // Backend Options\n  backend: options,\n})\n```\n\n# Backend Options\n\n```js\n{\n  // Database Name\n  dbName: '\u003cDB Name\u003e', // Required\n\n  // Or\n\n   // MongoDB standard configuration\n  host: '\u003cDB Host\u003e',\n  port: 27017,\n\n  // Or\n\n  // Use collection - See: https://doc.deno.land/https/deno.land/x/mongo/mod.ts#Collection\n  collection: Collection,\n\n  // MongoDB authentication. Remove it if not needed\n  user: '\u003cDB User\u003e',\n  password: '\u003cDB Password\u003e',\n\n  // Collection name in database will be used to store i18next data\n  colName: 'i18n',\n\n  // MongoDB field name\n  // Language data\n  langFieldName: 'lang',\n  // Namespace data\n  nsFieldName: 'ns',\n  // Data\n  dataFieldName: 'data',\n\n  // Remove MongoDB special character from field name - See https://jira.mongodb.org/browse/SERVER-3229\n  sanitizeFieldName: true,\n\n  // Error handlers\n  readOnError: console.error,\n  readMultiOnError: console.error,\n  createOnError: console.error,\n\n  // MongoClient Options - See: https://doc.deno.land/https/deno.land/x/mongo/mod.ts#ClientOptions\n  mongodb: ClientOptions\n};\n```\n\n## Example Backend Options\n\n#### Connect with `host` and `port`:\n\n```js\n{\n  host: 'localhost',\n  port: 27017,\n  dbName: 'test' // Required field\n}\n```\n\n#### Connect with `collection` instance (_Recommended_):\n\nIf you already have your own connection, use this to avoid useless connections\n\n```js\n{\n  collection: Collection, // See: https://doc.deno.land/https/deno.land/x/mongo/mod.ts#Collection\n  dbName: 'test', // Required field\n}\n```\n\n## Example of the MongoDB document that will be created:\n\n```json\n// Key name is according to provided in options\n{\n  \"lang\": \"en-US\",\n  \"ns\": \"translations\",\n  \"data\": {\n    \"key\": \"Thank you!\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fdn-i18next-mongo-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamualfa%2Fdn-i18next-mongo-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fdn-i18next-mongo-backend/lists"}