{"_id":"@albertdz/sml","_rev":"6-04e0da3b9889abf416ded715ff1d6a75","name":"@albertdz/sml","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"@albertdz/sml","version":"1.0.0","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.0.0","gitHead":"d38a8e6b6124c15efc85623aee65156fd4c5ae1e","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-YMndcCAC/f//JVzD81W0XGOBz8/zBqFxU7JwkTvzBmpJ23uybfcQACLcKKpdeDIHj5EbZ81UMPuRGJMoQm/7kg==","shasum":"98c8ad16f2c750c070b356b3b3194b47ac7c3b8f","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.0.0.tgz","fileCount":8,"unpackedSize":6579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDkDclaW0KK8Ll5Mmjr7sNb2cvKo9xAZA5DlMBDeYpgXAiEAlZHvvFAiJF/77B8PiEwQxRWJfoN9LNG1FwiO4J5oRug="}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.0.0_1711048465695_0.8370822917751182"},"_hasShrinkwrap":false},"1.0.1":{"name":"@albertdz/sml","version":"1.0.1","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.0.1","gitHead":"d38a8e6b6124c15efc85623aee65156fd4c5ae1e","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-e0zYj83zQiOP/dqazYe0xVK6MyKp6heoqHMBSrn0gXWF4AlpoJtrXZsVIzeEqblKN3IZRd5oRkHTGmZqUZUZkA==","shasum":"469eda32417b4ae5caff729535da7f8ccdc68ea7","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.0.1.tgz","fileCount":9,"unpackedSize":6643,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCznQrWFhYbeQWIiTtWXNPIXl+ujIN4Y80pNKDR5lMvtwIhAJCLW6CUvb1Lc6ED8eluTu2puiCU9Ll++epnoWla+TD8"}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.0.1_1711054161671_0.22700380905939"},"_hasShrinkwrap":false},"1.0.2":{"name":"@albertdz/sml","version":"1.0.2","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.0.2","gitHead":"d38a8e6b6124c15efc85623aee65156fd4c5ae1e","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-+jQoQSnIZLB+MxmqgeZm4Spy7VGcQMRgs4fNAmTfRd7ImiVuQybztj04kpeYPsGlPfDzie1iyVEjC5arnXlZYA==","shasum":"d0e5e9eb97b4fc91a8cd72f4455ba9a956aa394e","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.0.2.tgz","fileCount":9,"unpackedSize":6652,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3MJgLhWeqkmyX+/0qj2Swb0/EqXIJuzdGJHh195lTVwIhAPiWVp8TIjH1llRCIHBbe6a5mJYhM9aBIFNgDqKRklFP"}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.0.2_1711054363363_0.07803576469253293"},"_hasShrinkwrap":false},"1.1.0":{"name":"@albertdz/sml","version":"1.1.0","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.1.0","gitHead":"fbf636ef987799c64c29013abfb4e0bd49f26d5a","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-JNobs03Yb2Hms47HJqW3mH88FVIVb8VdcKQyVuL8dGYnBkbtO0Gy7jB6sRxvH66xczfTKnCItVsYHxjmJQ7Bww==","shasum":"31c27e478daef14811b870f1b65804595e6544e8","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.1.0.tgz","fileCount":9,"unpackedSize":6797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK/IhXhCbakMppXiG8b6RLjhfbWzKOirIw+4tRqd45dQIhAIEOZAEiWMMedB0U43zipvlTlIAKWvWKkY4JriDXxMMq"}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.1.0_1711056010191_0.6035716978393078"},"_hasShrinkwrap":false},"1.2.0":{"name":"@albertdz/sml","version":"1.2.0","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.2.0","gitHead":"63a241647ca6993c584cbcd26d7f3f676e9b1f33","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-RFfI8lLvEOQHY8HmznCpr3YQ2sQcTZiW3VTwOaoiNRK/6wkJz/+hzJBt9nhtSO7Uwrq3y4+SM9qRxz2NgXCIrA==","shasum":"1b67552448c7bebb3e24c140df31a75767ab2120","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.2.0.tgz","fileCount":9,"unpackedSize":7094,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyf3El4C+cmlSzhErnGvIT9qhZu4ZvZoaI7/q33aR8tAiEAuAvoyJV6Wt5t8O7tr0DalkKu+luKhjeU8x+nkeNOKiE="}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.2.0_1711567457233_0.666639845510403"},"_hasShrinkwrap":false},"1.2.1":{"name":"@albertdz/sml","version":"1.2.1","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.2.1","gitHead":"29e4b9d3d8e276627c94e2db1fb694366c82917d","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-ZlcqHznXtVqpbdh1jRiRfMESHij5dlXNYDT28YcJlf5BeFKIW/HfC81GIQ10LJKAfAsfFaE2yjVUWxbH68VazA==","shasum":"11199ac3bdf1f112f73fe0f9dbc6a9773b403638","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.2.1.tgz","fileCount":9,"unpackedSize":7286,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/7vhwlzqk7D1tOxL+/giUEpYvjIavNm6beHbeV9qRvgIgCt1tKwPXGnQfwEPlKuzx67w27FvCalZlMhNX/eRI8ZI="}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.2.1_1712675732208_0.3086785595046033"},"_hasShrinkwrap":false},"1.2.2":{"name":"@albertdz/sml","version":"1.2.2","description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","main":"main.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"keywords":["multilingual","i18n","internationalization","localization","language","translation"],"author":{"name":"Albert Diaz"},"license":"ISC","bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"homepage":"https://github.com/AlbertDz/sml#readme","engines":{"node":">=12"},"exports":{".":"./main.js"},"types":"./main.d.ts","directories":{"lib":"core"},"dependencies":{"dotenv":"^16.4.5"},"devDependencies":{"@babel/preset-env":"^7.24.3","jest":"^29.7.0"},"_id":"@albertdz/sml@1.2.2","gitHead":"4591025a597de795ffa02955ab4d46ad4d0caae1","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-cXi381ICGV6XcR2XRtlVSzDc24M1bi684yhDZ4HfhNve8k0jOSOavsZ8crWpRnpJfbFrs0L8FmQDXDwxOUcL0g==","shasum":"0d8928171b99120e0ba80587557671143552d5a9","tarball":"https://registry.npmjs.org/@albertdz/sml/-/sml-1.2.2.tgz","fileCount":9,"unpackedSize":7094,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDikyC4SPJw0t/fUpzmkD8UHk0okcKmTqCSBgrIPEstKQIhAMsOoT/dwKUxn9Xt9KAep5dHvK8Q9EkLckmQSEPTgrm9"}]},"_npmUser":{"name":"albertdz","email":"diazalbert45@gmail.com"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sml_1.2.2_1712676655019_0.21922465572829553"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-21T19:14:25.556Z","1.0.0":"2024-03-21T19:14:25.825Z","modified":"2024-04-09T15:30:55.362Z","1.0.1":"2024-03-21T20:49:21.837Z","1.0.2":"2024-03-21T20:52:43.515Z","1.1.0":"2024-03-21T21:20:10.330Z","1.2.0":"2024-03-27T19:24:17.406Z","1.2.1":"2024-04-09T15:15:32.351Z","1.2.2":"2024-04-09T15:30:55.206Z"},"maintainers":[{"name":"albertdz","email":"diazalbert45@gmail.com"}],"description":"Effortlessly and swiftly transform web applications into a multilingual system with ease. Our solution simplifies the process, allowing for quick adaptation to diverse language preferences, ensuring broader accessibility and user engagement.","homepage":"https://github.com/AlbertDz/sml#readme","keywords":["multilingual","i18n","internationalization","localization","language","translation"],"repository":{"type":"git","url":"git+https://github.com/AlbertDz/sml.git"},"author":{"name":"Albert Diaz"},"bugs":{"url":"https://github.com/AlbertDz/sml/issues"},"license":"ISC","readme":"# Simple multi language\r\n\r\n## Configuración y Uso de @albertdz/sml\r\n\r\n### Instalación\r\n```bash\r\nnpm i @albertdz/sml\r\n```\r\n\r\n### Configuración de Variables de Entorno\r\nAntes de utilizar la librería, es necesario configurar algunas variables de entorno que serán utilizadas para su funcionamiento. A continuación se detallan las variables que necesitas configurar:\r\n\r\n* `TYPE_FILE`: Este valor indica la extensión de donde se obtendrán los valores. Acepta los valores `csv`, `json` y `txt`. Se recomienda utilizar `txt` en producción (archivo encriptado con los valores de la traducción).\r\n\r\n* `PATH_FILE`: Indica la ruta donde se encuentra el archivo `csv` o `json`.\r\n\r\n* `CRYPT_KEY`: Llave para encriptar y desencriptar los datos del archivo `txt`.\r\n\r\n.env\r\n```bash\r\nTYPE_FILE=\"txt\"\r\nPATH_FILE=\"C:/Users/Username/Desktop/Projects/My_app\"\r\nCRYPT_KEY=\"1234567890123456\"\r\n```\r\n\r\nAdemás, es importante destacar que el archivo debe llamarse `lang.csv` o `lang.json` y seguir la siguiente estructura:\r\n\r\n### Estructura del Archivo\r\nlang.csv\r\n```bash\r\nproperty;es;en;... \r\ntest;Prueba;Test;...\r\n```\r\n\r\nlang.json\r\n```json\r\n{\r\n  \"es\": {\r\n    \"test\": \"Prueba\"\r\n  },\r\n  \"en\": {\r\n    \"test\": \"Test\"\r\n  }\r\n}\r\n```\r\n\r\n### Uso\r\nUna vez que tienes configuradas las variables de entorno y preparado el archivo de traducción, puedes comenzar a utilizar la librería. Aquí te mostramos cómo hacerlo:\r\n```javascript\r\nconst { text, createCryptFromCsv, createCryptFromJson } = require(\"@albertdz/sml\");\r\n\r\nconst value = text('test', 'en');\r\ncreateCryptFromCsv(); // Crea el lang.txt a partir de un csv\r\ncreateCryptFromJson(); // Crea el lang.txt a partir de un json\r\n```\r\nRecuerda que el archivo `lang.txt` se crea de forma interna, por lo que se recomienda trabajar con él en producción. En el caso de desarrollo, puedes utilizar el archivo `lang.csv` o `lang.json`.\r\n\r\n### Soporte TS\r\n```text\r\n/\r\n└── @types/\r\n    └──albertdz__sml/\r\n        └── index.d.ts\r\n```\r\n\r\n```typescript\r\ndeclare module '@albertdz/sml' {\r\n  export function text(property: string, lang: string): string;\r\n  export function createCryptFromCsv(): void;\r\n  export function createCryptFromJson(): void;\r\n}\r\n```\r\n","readmeFilename":"README.md"}