Getting iLib into your project
iLib
iLib is an internationalization library written in pure ES5 Javascript.
It does not require any other libraries to function, and can run equally well in various older and newer browsers,
on various OS's (including mobile), nodejs, webOS, Qt/QML, RingoJS, React/Enact, or rhino/nashorn.
Documentation
What Can iLib Do?
iLib contains many classes that cover a large number of i18n topics, a lot more than almost all other JS i18n libraries.
- String translation (ResBundle)
- String formatting, including plurals/choice formats (IString)
- Character type functions (like the C/C++ ctype functions) (CType)
- Calendars (CalendarFactory)
- Gregorian, Julian, ThaiSolar, Persian algorithmic, Persian astronomical, Hebrew, Arabic civil, Ethiopic, Coptic, Chinese Han
- Date and time representation and conversion to other calendars (DateFactory)
- Date and time formatting in all calendars, including full time zone support (DateFmt)
- Time zone information from IANA TZ database (TimeZone)
- Duration formatting for lengths of events, videos, music, etc. (DurationFmt)
- Date range formatting with specific start and end times (DateRngFmt)
- Unicode character normalization using the Unicode Normalization Algorithm (NormString)
- Also supports full character iteration (as opposed to Unicode character iteration)
- Unicode glyph string iteration (GlyphString)
- Number parsing (INumber) and numeric formatting, including percentages and currencies (NumFmt)
- Units conversion, scaling, and formatting (lengths, volumes, temperature, velocity, etc.) (Measurement and UnitFmt)
- Phone number parsing and normalization (PhoneNumber), geo-location (PhoneGeoLocator), and formatting (PhoneFmt)
- Personal name parsing (Name) and formatting (NameFmt)
- Mailing address parsing (Address) and formatting (AddressFmt)
- Collation/sorting and sortkey generation (Collator)
- Locale-sensitive upper- and lower-casing (CaseMapper)
- Information about writing systems/scripts (ScriptInfo)
- Information about currencies (Currency)
- Information about locale settings such as default time zone, default calendar, use of 12 or 24-hour clock,
- List formatting such as "Joe, Tom, and Steve" (ListFormatter)
- Alphabetic index keeping. For example, it can be used to put names on a contact list into their corresponding letter buckets(AlphabeticIndex)
plus a lot more.