Socket
Socket
Sign inDemoInstall

onedionys-localization-manager

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onedionys-localization-manager

One Dionys (Localization Manager) - Manager to manage various local resources in multilingual applications.


Version published
Weekly downloads
3
increased by50%
Maintainers
2
Weekly downloads
 
Created
Source

Welcome to One Dionys - Localization Manager! 👋

Manager to manage various local resources in multilingual applications. 💖

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax
// Example usage of LocalizationManager

const LocalizationManager = require('./src/localizationManager');

// Create a new instance of LocalizationManager
const manager = new LocalizationManager();

// Load localization data for English locale
const englishData = {
    greeting: 'Hello',
    farewell: 'Goodbye'
};
manager.loadLocaleData('en', englishData);

// Translate keys to English
console.log(manager.translate('greeting', 'en')); // Output: Hello
console.log(manager.translate('farewell', 'en')); // Output: Goodbye
console.log(manager.translate('missingKey', 'en')); // Output: Translation not found for key 'missingKey' in locale 'en'
Explanation
  • loadLocaleData(locale, data): Loads localization data for a specific locale. locale is a string representing the locale (e.g., 'en' for English), and data is an object containing key-value pairs of translations.
  • translate(key, locale): Translates the given key to the specified locale. Returns the translated string if found, otherwise returns a message indicating that the translation was not found.
Return Value
  • For loadLocaleData(locale, data): No return value.
  • For translate(key, locale): Returns the translated string if found, otherwise returns a message indicating that the translation was not found.

📆 Release Date

  • v1.0.0 : 08 March 2024
  • v1.0.1 : 11 March 2024
  • v4.0.0 : 11 March 2024
  • v4.0.1 : 12 March 2024
  • v4.0.2 : 18 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

  • Facebook : Oned Ionys
  • Instagram : @onedionys
  • Twitter : @onedionys
  • LinkedIn : @onedionys

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - Localization Manager is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - Localization Manager? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

Keywords

FAQs

Package last updated on 31 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc