#locale #posix #localization #api-bindings

locale-settings

A higher-level interface to locale settings accessed via the POSIX C API

2 unstable releases

0.3.0 Aug 26, 2019
0.1.0 Aug 26, 2019

#333 in Internationalization (i18n)

MIT license

180KB
4.5K SLoC

Crate simple-locale

travis.ci crates.io docs.rs Minimum Rust Version mit License GitHub stars

This crate provides a higher-level interface to locale settings, usually accessed via POSIX (see ISO/IEC 15897) operating system functions.

Operating System Coverage

Currently only tested on macOS, Linux and Windows to come.

Pre-Build Process

The following describe two code generation steps that are executed outside the normal build process as the output is stored in Git and versioned based on external factors.

FFI Bindings

As mentioned above, this crate depends on FFI bindings to POSIX locale functions, and there are O/S differences that make this a pain. The script create-bindings.sh is used to generate these bindings (using cargo bindgen) in such a way that different O/S bindings can be built effectively.

History

TODO

  • Determine naming convention between the names in the codes and settings modules.
    • Expect that the names in code modules will be changed to reflect those in the settings.
  • Build and test for Linux.
    • How to deal with extended LC_ categories (address, identification, measurement, name, paper, telephone).
  • Build and test for Windows.

Dependencies

~2.2–3.5MB
~56K SLoC