🚀 Quick Start
npm install @localazy/cdn-client
import { CdnClient } from '@localazy/cdn-client';
const cdn = await CdnClient.create({
metafile: 'https://delivery.localazy.com/_a855374211039568660198b39c31/_e0.v2.json',
});
const result = await cdn.fetch({
files: cdn.metafile.files[0],
locales: ['en', 'de'],
});
example result
const result = {
en: {
cdn_info: 'With the CDN you can deliver the translation files instantly',
cdn_testing: "We're testing the CDN",
hello_localazy: 'Hello Localazy!',
using_javascript: 'In this project we decided to use JavaScript',
},
de: {
cdn_info: 'Mit dem CDN können Sie die Übersetzungsdateien sofort liefern',
cdn_testing: 'Wir testen das CDN',
hello_localazy: 'Hallo Localazy!',
using_javascript: 'In diesem Projekt haben wir uns für JavaScript entschieden',
},
};
For more information, visit Installation guide.
🛟 Support
💙 Localazy Packages
Check out all npm packages from Localazy:
Discover all available integration options and localization examples.
📜 License
Code released under the MIT license.