# License

Copyright 2026-2027 Kip Cole

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and limitations under the
License.

---

# Unicode Data

Localize embeds and redistributes data derived from the Unicode Common Locale Data Repository (CLDR) and the Unicode Character Database (UCD), both published by Unicode, Inc. The CLDR release this package was built from is recorded in `priv/localize/version`.

## What is used, and how

The build pipeline in `data/` reads CLDR's XML and JSON releases together with the UCD tables in `priv/unicode/`, and compiles them into the Erlang term files under `priv/localize/`. Those files are the form in which Unicode data is distributed:

* `priv/localize/locales/*.etf` — per-locale data: number, date, time, unit, currency, list and display-name formats, and plural rules. Only `en.etf` and `und.etf` are included in the Hex package; the remaining locales are downloaded at runtime from `https://elixir-localize.com/locales`, and are the same data in the same form.

* `priv/localize/supplemental_data/`, `priv/localize/validity/` — CLDR supplemental and validity data: territory containment, likely subtags, language matching, unit conversions and preferences, currency definitions, time zone metadata and subtag validity.

* `priv/localize/collation_table.etf` — collation weights derived from the CLDR root collation (`FractionalUCA.txt`), which is itself derived from the Unicode Collation Algorithm and the UCD.

Code generated by `mix localize.unit.gen_conversions` embeds CLDR unit conversion factors as Elixir source, and so carries this notice too.

The test data under `test/support/data/` includes cases taken from ICU's own test files, also published by Unicode, Inc. under the same license: `currency_amount_corpus.tsv` carries the currency parsing cases of ICU's `numberformattestspecification.txt` the currency name strings of ICU4C's `TestParseCurrencyInUCurr`, the currency round-trip tables of ICU4J's `NumberFormatTest.java` and ICU4C's `numfmtst.cpp`, and the plain decimal rows of CLDR's number test data (vendored as `decimal_*_test_data.tsv`), with Localize's expected results. Test data is not part of the Hex package.

No Unicode data is modified in meaning. The pipeline reshapes it for efficient runtime access and discards fields Localize does not use.

## Notice

The Unicode data is used under the Unicode License v3 (`SPDX-License-Identifier: Unicode-3.0`). The following notice is reproduced verbatim, as that license requires.

    COPYRIGHT AND PERMISSION NOTICE

    Copyright © 1991–2026 Unicode, Inc. All rights reserved.
    Distributed under the Terms of Use in https://www.unicode.org/copyright.html.

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of data files and any associated documentation (the "Data Files") or
    software and any associated documentation (the "Software") to deal in the
    Data Files or Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, and/or sell
    copies of the Data Files or Software, and to permit persons to whom the
    Data Files or Software are furnished to do so, provided that either (a)
    this copyright and permission notice appear with all copies of the Data
    Files or Software, or (b) this copyright and permission notice appear in
    associated Documentation.

    THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
    KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
    THIRD PARTY RIGHTS.

    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
    FILES OR SOFTWARE.

    Except as contained in this notice, the name of a copyright holder shall
    not be used in advertising or otherwise to promote the sale, use or other
    dealings in these Data Files or Software without prior written
    authorization of the copyright holder.

---

# bojanz/currency test data

`test/support/data/currency_amount_corpus.tsv` also carries the format and parse cases of the tests of [bojanz/currency](https://github.com/bojanz/currency) (`formatter_test.go`), read back as currency amounts with Localize's expected results. They are used under the MIT License. Test data is not part of the Hex package.

    MIT License

    Copyright (c) 2020 Bojan Zivanovic and contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

---

# scrapinghub/price-parser test data

`test/support/data/currency_amount_corpus.tsv` also carries price strings from the tests of [scrapinghub/price-parser](https://github.com/scrapinghub/price-parser) (`tests/test_price_parsing.py`), each given a locale and Localize's expected result. They are used under the BSD 3-Clause License. Test data is not part of the Hex package.

    Copyright (c) Scrapinghub
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:

        1. Redistributions of source code must retain the above copyright notice,
           this list of conditions and the following disclaimer.

        2. Redistributions in binary form must reproduce the above copyright
           notice, this list of conditions and the following disclaimer in the
           documentation and/or other materials provided with the distribution.

        3. Neither the name of ScrapingHub nor the names of its contributors may be used
           to endorse or promote products derived from this software without
           specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
