ChooseALicense.com Documentation

repository·gh-pages·Indexed 26 days ago

https://github.com/github/choosealicense.com

A catalog of open source licenses designed to help developers make informed decisions about which license to use for their projects. This repository includes documentation on the license metadata schema, property rules for permissions, conditions, and limitations, and guides for licensing non-software projects such as hardware, fonts, and media.

Tokens
4K
Snippets
5
Records
27
Agent score
88%

What's inside choosealicense.com

  1. Understand the scope of Choosealicense.com

    gh-pages

    Choosealicense.com is not a comprehensive directory of all open source licenses. It is designed to help developers make informed decisions by highlighting common options. For most projects, the site recommends:

    1. Choosing a license preferred by projects similar to yours.
    2. Using the most popular permissive license (MIT).
    3. Using the most popular copyleft license (GNU GPLv3).

    If your needs are specific, you can explore other highlighted licenses (/licenses) or licenses for non-software projects (/non-software). A full table of every license cataloged in this repository can be found in the appendix.

  2. Understand the Weblate translation workflow

    gh-pages

    The project uses Weblate to manage community translations. English is the single source of truth; if a translation is incomplete, the site automatically falls back to English.

    Translation Types:

    • YAML (String-by-string in Weblate): ui.yml (interface/home), rules.yml (rule labels), and licenses.yml (license summaries).
    • Markdown (File-based via Pull Requests): Per-language prose pages located in i18n/<lang>/ (e.g., about.md, community.md, no-permission.md, non-software.md).
    • Never Translated: The legal text of licenses.

    Update Flow:

    1. Maintainers update English source files.
    2. Weblate pulls changes and flags affected strings as needing updates in all languages.
    3. Translators update strings in Weblate.
    4. Weblate automatically opens or updates a pull request with the new translations for maintainer review.
  3. Understand the legal status of Choosealicense.com content

    gh-pages

    Choosealicense.com is operated by GitHub, Inc. The information provided on the site does not constitute legal advice. Using the site or contacting GitHub regarding the site does not create an attorney-client relationship.

    Important: You should always consult with your own legal counsel before making decisions that impact your legal rights or have legal ramifications for your project. GitHub provides the site on an "as-is" basis and makes no warranties regarding the accuracy or reliability of the information or licenses provided.

  4. Add a new language to the site

    gh-pages

    To add a new language, follow these three steps:

    1. Update Configuration: Add the language code to the languages: list in _config.yml. This enables the language in the site build.
    2. Configure Weblate: In Weblate, add the language to each component. Weblate will automatically create the _data/i18n/<code>/<file>.yml files based on the English templates.
    3. Translate Prose: Prose pages (e.g., i18n/<lang>/about.md) are added as files via pull requests when they are translated. Until then, these pages will fall back to English.
  5. License software documentation

    gh-pages

    You can use any open source software license or any open media license (like Creative Commons) for software documentation.

    Important: If you use a different license for your documentation than for your software, you must explicitly specify that any source code examples contained within the documentation are licensed under the software license.

  6. Add or update YAML translations (Interface, Rules, and Summaries)

    gh-pages

    To translate UI elements, rule labels, or license summaries, edit or create the following YAML files in the _data/i18n/<lang>/ directory:

    • ui.yml: Contains interface strings (buttons, menus, headings). Keys ending in _html contain raw HTML; all other keys contain Markdown. Keep placeholders like %title%, %projects%, %license%, and %language% intact.
    • rules.yml: Mirrors the structure of _data/rules.yml using the format <group><tag>{ label, description }.
    • licenses.yml: Contains license summaries (descriptions, 'how' to use, and notes). This file is keyed by the lowercased SPDX ID (e.g., mit, gpl-3.0).

    Note: The legal text of a license (found in _licenses/*.txt) is never translated.

  7. Run ChooseALicense.com locally

    gh-pages

    Follow these steps to clone the repository, bootstrap the environment, and start a local development server.

    1. Clone the repository recursively: git clone https://github.com/github/choosealicense.com.git --recursive
    2. Navigate to the directory: cd choosealicense.com
    3. Run the bootstrap script: ./script/bootstrap
    4. Start the server: ./script/server

    Once running, access the site at http://localhost:4000.

    git clone https://github.com/github/choosealicense.com.git --recursive
    cd choosealicense.com
    ./script/bootstrap
    ./script/server
  8. Add a brand-new language to choosealicense.com

    gh-pages

    To support a new language, follow these steps:

    1. Add the language code to the languages: list in _config.yml.
    2. Create _data/i18n/<code>/ui.yml by copying _data/i18n/en/ui.yml and translating the values while keeping the original keys.
    3. (Optional) Create _data/i18n/<code>/licenses.yml and _data/i18n/<code>/rules.yml for localized summaries and labels.
    4. (Optional) Create per-language prose pages in i18n/<code>/ (e.g., about.md, community.md, no-permission.md, non-software.md).

    Any missing translations will automatically fall back to English.

  9. Configure Weblate components for YAML translation

    gh-pages

    When setting up Weblate, connect it to the repository and add one monolingual component per YAML tier using the following configurations:

    ComponentFile formatFile maskMonolingual base file
    InterfaceYAML_data/i18n/*/ui.yml_data/i18n/en/ui.yml
    Rule labelsYAML_data/i18n/*/rules.ymlEnglish base (see note)
    License summariesYAML_data/i18n/*/licenses.ymlEnglish base (see note)

    Note on Rule/Summary Bases: Since English rule labels live in _data/rules.yml and English summaries live in license front matter, you must either:

    1. Generate _data/i18n/en/rules.yml and _data/i18n/en/licenses.yml from those sources as a build/CI step and point Weblate to them.
    2. Keep rules.yml and licenses.yml out of Weblate and manage them via ordinary pull requests.

    Recommended Weblate Settings:

    • Enable "Update on push".
    • Set "Template for new translations" to the English base.
    • Keep "Edit base file" disabled to prevent contributors from changing the source language.
  10. Select licenses for data, media, and datasets

    gh-pages

    For non-software materials such as datasets, videos, and other media, use Creative Commons licenses. Recommended licenses include:

    • CC0-1.0
    • CC-BY-4.0
    • CC-BY-SA-4.0

    Note: Creative Commons does not recommend using these licenses for software or hardware.