Coder Social home page Coder Social logo

yongqli / icu4x Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unicode-org/icu4x

0.0 0.0 0.0 47.73 MB

Solving i18n for client-side and resource-constrained environments.

License: Other

JavaScript 1.96% C++ 5.92% Python 0.04% C 0.32% Rust 90.81% TypeScript 0.28% Makefile 0.37% HTML 0.26% Batchfile 0.02% Dockerfile 0.01% SCSS 0.01%

icu4x's Introduction

ICU4X Docs Build Status Coverage Status (Coveralls) Coverage Status (Codecov)

Welcome to the home page for the ICU4X project.

ICU4X provides components enabling wide range of software internationalization. It draws deeply from the experience of ICU4C, ICU4J and ECMA-402 and relies on data from the CLDR project.

The design goals of ICU4X are:

  • Small and modular code
  • Pluggable locale data
  • Availability and ease of use in multiple programming languages
  • Written by i18n experts to encourage best practices

Stay informed! Join our public, low-traffic mailing list: [email protected]. Note: After subscribing, check your spam folder for a confirmation.

Documentation

For an introduction to the project, please visit Introduction to ICU4X for Rust tutorial.

For technical information on how to use ICU4X, visit our API docs.

More information about the project can be found in the docs subdirectory.

Quick Start

An example ICU4X powered application in Rust may look like this:

icu = "0.2"
icu_provider_fs = "0.2"
use icu::locid::locale;
use icu::datetime::{DateTimeFormat, mock::datetime::MockDateTime, options::length};
use icu_provider_fs::FsDataProvider;

fn main() {
    let date: MockDateTime = "2020-10-14T13:21:00".parse()
        .expect("Failed to parse a datetime.");

    let provider = FsDataProvider::try_new("/home/{USER}/projects/icu/icu4x-data")
        .expect("Failed to initialize Data Provider.");

    let options = length::Bag {
        time: Some(length::Time::Medium),
        date: Some(length::Date::Long),
        ..Default::default()
    }.into();

    let dtf = DateTimeFormat::try_new(locale!("pl"), &provider, &options)
        .expect("Failed to initialize DateTimeFormat");

    let formatted_date = dtf.format(&date);

    println!("๐Ÿ“…: {}", formatted_date);
}

Development

ICU4X is developed by the ICU4X-SC. We are a subcommittee of ICU-TC in the Unicode Consortium focused on providing solutions for client-side internationalization. See unicode.org for more information on our governance.

Please subscribe to this repository to participate in discussions. If you want to contribute, see our contributing.md.

Charter

For the full charter, including answers to frequently asked questions, see charter.md.

ICU4X is a new project whose objective is to solve the needs of clients who wish to provide client-side i18n for their products in resource-constrained environments.

ICU4X, or "ICU for X", will be built from the start with several key design constraints:

  1. Small and modular code.
  2. Pluggable locale data.
  3. Availability and ease of use in multiple programming languages.
  4. Written by i18n experts to encourage best practices.

ICU4X will provide an ECMA-402-compatible API surface in the target client-side platforms, including the web platform, iOS, Android, WearOS, WatchOS, Flutter, and Fuchsia, supported in programming languages including Rust, JavaScript, Objective-C, Java, Dart, and C++.

Benchmark dashboards

The performance benchmarks are all run on Ubuntu, and are broken out by component.

The memory benchmarks are run separately on each platform, and examples are individually instrumented.

The binary size benchmarks run on Ubuntu, and are broken out by file type.

The data size benchmark tracks size of provider/testdata/data/testdata.postcard and runs on Linux.

icu4x's People

Contributors

sffc avatar manishearth avatar zbraniecki avatar robertbastian avatar echeran avatar hsivonen avatar dminor avatar gregtatum avatar aethanyc avatar nciric avatar makotokato avatar nordzilla avatar andrewpollack avatar samchen61661 avatar pandusonu2 avatar filmil avatar iainireland avatar gnrunge avatar mildgravitas avatar younies avatar shadaj avatar mihnita avatar eggrobin avatar hagbard avatar dependabot[bot] avatar evanjp avatar qnnokabayashi avatar yzhang1994 avatar sapriyag avatar snktd 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.