GithubHelp home page GithubHelp logo

jquery-lang-switcher's Introduction

jQuery i18n Language Switcher

This jQuery plugin offers an easy way to add multilingual support to input fields in a web form, including rich text fields using CKEditor.

Features

  • Multilingual support for text and textarea input fields
  • Integration with CKEditor 5 for rich text editing
  • Language switcher buttons for user selection
  • Text alignment and direction adaptation for RTL and LTR languages
  • Utilizes browser's locale if specific locales aren't defined
  • support the edit mode
  • compatible with bootstrap

Getting Started

To integrate the jQuery i18n Language Switcher, follow the instructions below.

Prerequisites

Installation

  1. Include the jQuery i18n script in your HTML file after including jQuery:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="path/to/jquery.i18n.js"></script>
  1. Call the i18n function on the desired input element with the required configuration:
$('input-selector').i18n({
    attribute: 'name', // custom attribute name (default is 'name')
});
  1. You can also customize the locales by adding the data-i18n attribute to the HTML elements:
<input type="text" data-i18n="en,ar" class="i18n-input" />

Customizing CKEditor If the input has a class of 'ckeditor', the plugin will initialize CKEditor on that input. Ensure that the CKEditor script is included in your project for this to work.

License This project can be licensed as required by your needs or organization.

Note: Ensure that you have the necessary dependencies included in your project, and consult the code documentation for further details on advanced usage.

Feel free to modify or expand this structure as per your project requirements or specific details!

Screenshot of Input

jquery-lang-switcher's People

Contributors

dt4it avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.