{"_id":"@elham-oss/light-localize-router","_rev":"5-aa2b3fd3e3bc9f3771d4bedeefb1aa1a","name":"@elham-oss/light-localize-router","dist-tags":{"latest":"0.13.0"},"versions":{"0.5.0":{"name":"@elham-oss/light-localize-router","version":"0.5.0","repository":{"type":"git","url":"git+https://github.com/elham-oss/light-localize-router.git"},"bugs":{"url":"https://github.com/elham-oss/light-localize-router/issues"},"peerDependencies":{"@angular/common":"^10.0.14","@angular/core":"^10.0.14","@angular/router":"^10.0.0","@ngx-translate/core":"^13.0.0"},"dependencies":{"tslib":"^2.0.0","rxjs":"~6.5.5"},"main":"bundles/elham-oss-light-localize-router.umd.js","module":"fesm2015/elham-oss-light-localize-router.js","es2015":"fesm2015/elham-oss-light-localize-router.js","esm2015":"esm2015/elham-oss-light-localize-router.js","fesm2015":"fesm2015/elham-oss-light-localize-router.js","typings":"elham-oss-light-localize-router.d.ts","sideEffects":false,"scripts":{"prepublishOnly":"node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"},"_resolved":"","_integrity":"","_from":"file:dist/libs/light-localize-router/elham-oss-light-localize-router-0.5.0.tgz","description":"This project was generated using [Nx](https://nx.dev).","homepage":"https://github.com/elham-oss/light-localize-router#readme","_id":"@elham-oss/light-localize-router@0.5.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-BhCNhC3D3DhOk3238U11AV51puyJAfGlubEYD3iBRjbndkRcgBZ2atiJRNAgO/4+618mLD/DxHoi/BFUvcssuA==","shasum":"0d8b3e5f7c97c19045c094922a1acf42e9bbee97","tarball":"https://registry.npmjs.org/@elham-oss/light-localize-router/-/light-localize-router-0.5.0.tgz","fileCount":51,"unpackedSize":187149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcVa/CRA9TVsSAnZWagAAbw0P/RqoDdHBXFIgRFU4SFy3\ny7FuvRGsiTSgXh4Z8oQTrDAx/Ponwwew4UbXM2UNuP7o/WP5T7bfD/LnkQSm\nptzAIk2lsYFljPNQEOHtfHjHiCC9XViPGKtgX9ukcOlrKVGQjB5rTqO7eDp+\nvSQwwGJAfeNY9GUQQYqhK7PNkGlCYXc/HZMu3FVCjdIqHLtr+WXrtrU8kmXA\n/sPEDy6OltAO/f4A8y7/Kbv0K4cKU9c0vr92g8h+LIRfqR006C6ja7LbL45I\nD/ino9Symx+4lqwy2AcuAr39TIP+tK15IwchKyE/CZMbDvN2Ps2k82lodqub\n5rKToHPfFrR6+uhQV/z1UKlTP/xK+1PtW4GW1Ko6RnyADU3BxzInml6EWJRx\nWBOcQEp4P+7Zi1VpDWCCQuYWsARGRf3uNbhYUAutDuToNXmg17AjJk8hbdK1\nqdtCUV9jyZucE9/DTXq59fw24MAVAUcOiBE0Y/74JETC9+HsQnB3X9xGjlSx\nC63D62TxxvsRnVPPPzvTBT/dq2cChxQhjLT89NMMkppiLZ9duYp4ut3tW5Mc\n/i3GN6jR7bQ0Gd9S9SpSRrmbJiSTZvr/XYj/NdJRk7niQhG0DoCa8qUkXXcX\nhCLSIaN0uNRLsHzXlbvnrqNoqqD8n8Yqmkf1Dd5ZV1VTNsu6YIiYKbOK5FJv\nZ4nv\r\n=d8aA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm/lGuGvwciaHk9PPQ3x9/mYig2wHaT6FFZxtQ3ewnYAIhAK6ykmG3ldZLhVMqegncUEJV77k3Zg0HwSKa8lVQXfOj"}]},"maintainers":[{"name":"mohammedmatar","email":"mohammed@matar.xyz"}],"_npmUser":{"name":"mohammedmatar","email":"mohammed@matar.xyz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/light-localize-router_0.5.0_1601263295220_0.5168342782278934"},"_hasShrinkwrap":false},"0.6.0":{"name":"@elham-oss/light-localize-router","version":"0.6.0","repository":{"type":"git","url":"git+https://github.com/elham-oss/light-localize-router.git"},"bugs":{"url":"https://github.com/elham-oss/light-localize-router/issues"},"peerDependencies":{"@angular/common":"^10.0.14","@angular/core":"^10.0.14","@angular/router":"^10.0.0","@ngx-translate/core":"^13.0.0"},"dependencies":{"tslib":"^2.0.0","rxjs":"~6.5.5"},"main":"bundles/elham-oss-light-localize-router.umd.js","module":"fesm2015/elham-oss-light-localize-router.js","es2015":"fesm2015/elham-oss-light-localize-router.js","esm2015":"esm2015/elham-oss-light-localize-router.js","fesm2015":"fesm2015/elham-oss-light-localize-router.js","typings":"elham-oss-light-localize-router.d.ts","sideEffects":false,"scripts":{"prepublishOnly":"node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"},"_resolved":"","_integrity":"","_from":"file:dist/libs/light-localize-router/elham-oss-light-localize-router-0.6.0.tgz","description":"> An implementation of routes localization for Angular without rewriting the router configuration. > This project was generated using [Nx](https://nx.dev).","homepage":"https://github.com/elham-oss/light-localize-router#readme","_id":"@elham-oss/light-localize-router@0.6.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-+rXLkycVawA++hirqmUpK9rsg2hq5XvZLTv5MumjtIhUO+rhBFjkTM9TDsbe0Y2HpvYpXX8F5060p5AJmTRTbQ==","shasum":"75ade4de961867d724b703a7facf18fdce0c291b","tarball":"https://registry.npmjs.org/@elham-oss/light-localize-router/-/light-localize-router-0.6.0.tgz","fileCount":51,"unpackedSize":185386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcg02CRA9TVsSAnZWagAATnUP/jcY0VUlK0G+jmabeYiZ\nVxt5xx27WczHeYBp/PKz2HAaejp7b6shJeOCpHkPUwoj6cTWZQUU58SRIBh8\nmLmCDKrnPonQVHGFc1CTP8usanZ6oytTg9tiHVMeJk4uRA1XzcZyd4EWDiqF\n1j4H9ZdKXNEnvrAmhNG/Ubs9ayTJuEzZSzZlcVBR97VgxGysMNmg+HR0dGp5\nKZUey+bZUgciCIBnDKTqYQseCG+wq6nvCpcjCdSi+nR1O8wdKPwXS+FVodYJ\nP45ESvJx5hcW+P9R/OMvJO1ZBt+qGMPAV0P7nJBcVv6x3FM5j6g+ExSCdYxd\n7qaHn6mPTwLjbo3xTFwEPqzL/GEdm7pj6+SQ8mgVl6flGYinTxJFL2XfFa7k\n/7SKAKHtEHiP45AjkhwT0P/WLCOJTFh08kSUnJPgwZ534ybNwMu46IPT199k\nMOYe2SZwaD7+ea4WF3R40AuwxXRF1Ia7HtX4ZUQ0wDsY+ju9OhwqMux9Edzo\n9fP5Fhw3vfK1zOytzqMtbYXOlZAY5N1eJ6JM77XkcTH6l44vcHM7zjCDd7Dt\nNP9CoHSxK2FUtL8657RnqOua2gR60riq3lImfohBMeyLvp7gTgZq+JOjdJWS\nkvPWqyzt8wKYL6i+Fs/tgAZ/velp5qsIWMkgvQjQsRjnLs68/1ADaqnr53WF\nrQUF\r\n=O8fg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHmvdz/BABE9TjJmzJjb207xN2u2LMktKt+MH78VlRnAIhALRVHIlmBuvpTVGHyVfbIByTHtd4Kji7MuL2+6pYs9nf"}]},"maintainers":[{"name":"mohammedmatar","email":"mohammed@matar.xyz"}],"_npmUser":{"name":"mohammedmatar","email":"mohammed@matar.xyz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/light-localize-router_0.6.0_1601310005995_0.04536017776298218"},"_hasShrinkwrap":false},"0.10.0":{"name":"@elham-oss/light-localize-router","version":"0.10.0","repository":{"type":"git","url":"git+https://github.com/elham-oss/light-localize-router.git"},"bugs":{"url":"https://github.com/elham-oss/light-localize-router/issues"},"peerDependencies":{"@angular/common":"^11.2.7","@angular/core":"^11.2.7","@angular/router":"^11.2.7","@ngx-translate/core":"^13.0.0"},"dependencies":{"tslib":"^2.0.0","rxjs":"~6.5.5"},"main":"bundles/elham-oss-light-localize-router.umd.js","module":"fesm2015/elham-oss-light-localize-router.js","es2015":"fesm2015/elham-oss-light-localize-router.js","esm2015":"esm2015/elham-oss-light-localize-router.js","fesm2015":"fesm2015/elham-oss-light-localize-router.js","typings":"elham-oss-light-localize-router.d.ts","metadata":"elham-oss-light-localize-router.metadata.json","sideEffects":false,"description":"> An implementation of routes localization for Angular without rewriting the router configuration. > This project was generated using [Nx](https://nx.dev).","licenseText":"\nCopyright 2020 Elham\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","license":"MIT","_id":"@elham-oss/light-localize-router@0.10.0","dist":{"shasum":"ea58b59eafa3d1eb3385041bb73c59a0155fc6aa","integrity":"sha512-KPsPrSgtZtIe1TbZWtsqr69y7ypgEEn+ICbAgJlj6vaRuHUlwEOiJGHEUNuxYNIbLnZ04wnmRkJzIGnp/3UShQ==","tarball":"https://registry.npmjs.org/@elham-oss/light-localize-router/-/light-localize-router-0.10.0.tgz","fileCount":81,"unpackedSize":241612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgX6LRCRA9TVsSAnZWagAAftMP/0zIp+cxp5qTUs6MlGch\n8sPsefEesJe+2E/C1JeVOKXCQgoiwr1c70jpTQJTt4/cs6373QV5+w+Lw++X\nYI4PsMjnf0sCrPto2yvrWshMm4jPCTHZHrqB8kwkyrJxRyjDYcBKygkIG3/k\nxR3CRpxH4iUJWbhBKb6oqJEw/o+kT6neRH0qEk1ydTt77d+izOvzDRTno3iU\nU/qjVdOnoZYNfWtTOWkibzGsjXJa7CDBC/fDqM39B6EjKxCLMKVvw2QUEV+1\nu2vNL+RX/YShOlb8umsnPnJX7XU5BIaCmTEtl8ZVmO9+LntIX97p7XN09gH5\nTO5gxBy8Db76X0Z0QUBkjTz08XW4Faxm4YoDFy159YcVIZdfhShl3pCvF6w0\nFDRxPthNfvsWeQPpzglPlxkdeKyvB74sCXYmCahPedBgFwKw8dGWBZpqUdbL\neZ12L/v5oZazFo9M0DSeZuaR43a0XD4fcj46fb6SSyUDZgEXi/KAd0ve4XHo\nyrJaFGWczt4I05KareTZ5hJ3Bp2fDCkJksNiv6BnhKCvD2OuFbwOasIOZcpN\nyID8gIC9JvrandN0hwc0T8H8WiWm7+fl6bhzG+V/Qo0b28Z6xRfq3lttSTHn\nNYDf1ODxvKI0pfZP+SwxK86WQK6CzUBn8cG9itpvntGp4PCom2FDAj1WQLAm\n8yVA\r\n=1HAY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYVqYh+7pze682DXoVBC1ZdzO+SiQ05POf/1EXLNlCfAiBM+9uf3zK67pFbJ+jLJVydahlSQovqDua21YvIThheXg=="}]},"_npmUser":{"name":"mohammedmatar","email":"mohammed@matar.guru"},"directories":{},"maintainers":[{"name":"mohammedmatar","email":"mohammed@matar.guru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/light-localize-router_0.10.0_1616880336578_0.7499072906603439"},"_hasShrinkwrap":false},"0.13.0":{"name":"@elham-oss/light-localize-router","version":"0.13.0","repository":{"type":"git","url":"git+https://github.com/elham-oss/light-localize-router.git"},"bugs":{"url":"https://github.com/elham-oss/light-localize-router/issues"},"peerDependencies":{"@angular/common":"^12.2.10","@angular/core":"^12.2.10","@angular/router":"^12.2.10","@ngx-translate/core":"^13.0.0"},"dependencies":{"tslib":"^2.0.0","rxjs":"~6.5.5"},"main":"bundles/elham-oss-light-localize-router.umd.js","module":"fesm2015/elham-oss-light-localize-router.js","es2015":"fesm2015/elham-oss-light-localize-router.js","esm2015":"esm2015/elham-oss-light-localize-router.js","fesm2015":"fesm2015/elham-oss-light-localize-router.js","typings":"elham-oss-light-localize-router.d.ts","sideEffects":false,"description":"> An implementation of routes localization for Angular without rewriting the router configuration. > This project was generated using [Nx](https://nx.dev).","_id":"@elham-oss/light-localize-router@0.13.0","dist":{"shasum":"0257763b9fa4ab52aa612e2060cf562ba0ede7e6","integrity":"sha512-Ijxgr83KT2lSVaIkVxcAlReQNAPGSWWQkAVkz59fofheCj+QmrsMhYlc0H/6HkH0MaWHHYKqXBhQezZ3XTpfOQ==","tarball":"https://registry.npmjs.org/@elham-oss/light-localize-router/-/light-localize-router-0.13.0.tgz","fileCount":63,"unpackedSize":179352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1WkdCRA9TVsSAnZWagAAQ5IP/2dFM9+LLsgbTfyHkbqP\n+y/JjTkxfZp2IvHfIkPwBWQ+/wtVkBogVSfKNMep39jxtgDMpRLuO8xGXRUI\nleWNGLJYEa9eb1Kt7iUovlLHcdQxQCYCSltYfZa2lhRfLnqO0yu44WmCpcRg\nE20CBP74huOrWOyjv95ZaQVajImqyxvnfPl4NylQFxZJrrTWcuw9q69ex3c7\ntiRHZJ9xi/UhNKUi8GBovfeJVRJf9LVGxeR8jOtjGA31KzBvKimPw1d+HRC+\nf7QXQscwU9vOzo/kqBlg5cu/3t4IMtodINjtrLrDtQloRh3KL3spXpQ1iTrb\nlpr96ojOFqUYvFpAzaE5XmxEH0Ix7mBuih1eDQ9M6WRZNUDCzrS3THH+ZToq\n8ibBNaI7ob8O4loL04IOe0PezCEjod8ym657EX0/22uHzuUaVW+228RgNNJk\nJIPDcBB1e+eeefR6uNlvqR2EhfTfvPxMgyjpCP6jOwWsp6fCt6KyO4zrnGww\nW6njMNEd3ahEvMlokyN/VBKmAq3vne7maytujs7W2H9phTvvX6pPw2S/9Owu\nigKtJfwQoRfhpnkbzauw/OuewbthHlYL21tvye1WgV/23JnpLuNvbIrYjVAT\ngkQCkNzy1ytehaiWCTF+U7JffL87cQ0a75ROjD5ExmQ2hbVPhJfHVTk2RDUW\n1E52\r\n=ubp4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGYLJPkEYeD/EdIIe9boUPzfQx4/46P2aeYRofB4c+rAiEA8Ovo3/0Hcp7XHSEDAIEVLx6dobL6zqmCfmzs3926MZ4="}]},"_npmUser":{"name":"mohammedmatar","email":"mohammed@matar.guru"},"directories":{},"maintainers":[{"name":"mohammedmatar","email":"mohammed@matar.guru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/light-localize-router_0.13.0_1634458472654_0.766744735235054"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-28T03:21:34.923Z","0.5.0":"2020-09-28T03:21:35.350Z","modified":"2022-04-05T07:11:29.920Z","0.6.0":"2020-09-28T16:20:06.143Z","0.10.0":"2021-03-27T21:25:36.749Z","0.13.0":"2021-10-17T08:14:32.817Z"},"maintainers":[{"name":"mohammedmatar","email":"mohammed@matar.guru"}],"description":"> An implementation of routes localization for Angular without rewriting the router configuration. > This project was generated using [Nx](https://nx.dev).","repository":{"type":"git","url":"git+https://github.com/elham-oss/light-localize-router.git"},"bugs":{"url":"https://github.com/elham-oss/light-localize-router/issues"},"readme":"# Light Localize Router for ngx-translate\n> An implementation of routes localization for Angular without rewriting the router configuration.\n>\nThis project was generated using [Nx](https://nx.dev).\n\n🔎 **Created By [Nrwl/Nx](https://nx.dev/) inspired by [angular-l10n](https://github.com/robisim74/angular-l10n/) & [Greentube/localize-router](https://github.com/Greentube/localize-router) & [gilsdav/ngx-translate-router](https://github.com/gilsdav/ngx-translate-router/).**\n\nfor demo please refer to the source code => `apps/documentation`,\nalso the demo app has been deployed to netlify [demo app](https://light-localize-router.netlify.app/)\nfor api documentations [click here](https://light-localize-router-api-docs.netlify.app/)\n \n# Table of contents:\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Initialize module](#initialize-module)\n    - [How it works](#how-it-works)\n- [License](#license)\n\n## Installation\n\nusing npm:\n```\nnpm install --save @elham-oss/light-localize-router\n```\nusing yarn:\n```\nyarn add --save @elham-oss/light-localize-router\n```\n\n## Usage\n\nIn order to use `@elham-oss/light-localize-router` you must initialize it with following information:\n* Localization Config along with loader.\n\n\n### Initialize module\n`import { LightLocalizeRouterModule } from '@elham-oss/light-localize-router';`\n\n* you need to add configure ngx-translate/core as described here [ngx-translate/core](https://github.com/ngx-translate/core)*\n\n```ts\nimport { Location } from '@angular/common';\nimport { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { HttpBackend, HttpClient, HttpClientModule } from '@angular/common/http';\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\nimport { AbstractParser, HttpLoader, LightLocalizeRouterModule } from '@elham-oss/light-localize-router';\n\nimports: [\n    TranslateModule.forRoot({\n        defaultLanguage: 'en',\n        loader: {\n          provide: TranslateLoader,\n          useFactory: HttpLoaderFactory,\n          deps: [HttpClientTrans]\n        }\n    }),\n    RouterModule.forRoot(routes),\n    LightLocalizeRouterModule.forRoot({\n        parser: {\n          provide: AbstractParser,\n          useFactory: (translate, location, injector, platformId, http) => {\n            return new HttpLoader(translate, location, http, injector, platformId)\n          },\n          deps: [TranslateService, Location, Injector, PLATFORM_ID, HttpClient]\n        }\n    })\n]\n```\n\n\n### How it works\n\nafter you add `@elham-oss/light-localize-router` to your project it will work like [angular-l10n](https://github.com/robisim74/angular-l10n/) routing but for [ngx-translate/core](https://github.com/ngx-translate/core):\n\nA prefix containing the language is added to the path of each navigation, creating a semantic URL:\n```\nbaseHref/[language][-script][-region]/path\n\nhttps://example.com/en/home\nhttps://example.com/en-US/home\n```\n\nIf the localized link is called, the _locale_ is also set automatically.\n\nTo achieve this, the router configuration in your app is not rewritten: the URL is replaced, in order to provide the different localized contents both to the crawlers and to the users that can refer to the localized links.\n\nIf you don't want a localized routing for _default locale_, you can enable it during the configuration:\n```json\n{\n    \"defaultRouting\": true\n}\n```\n\nyou can also create your own loader instead of http loader and provide the configuration for the library.\n","readmeFilename":"README.md"}