Skip to main content
Krywok Logo

Krywok Pipeline Plugin I18n is a plugin for Krywok Pipeline that provides internationalization (i18n) support.

Features

  • Comprehensive translations for all standard Condition and Match handlers.
  • Simple initialization to register all translations globally.

Installation

pip install "krywok-pipeline[i18n]"

Quick Start

Initialize the plugin at the start of your application to register the translations.

You must call set_base_locale before running the first handler to ensure the system correctly maps the initial translation state.

from pipeline_plugin_i18n import initialize_pipeline_plugin_i18n

# Register translations for standard handlers
initialize_pipeline_plugin_i18n()

# Set the base locale
PipelinePluginI18n.set_base_locale("en")

Context Management

The plugin uses contextvars to manage the locale state, making it thread-safe and safe for asynchronous applications (e.g., FastAPI, Falcon, Flask).

Setting the Locale

You can set the locale for the current context (e.g., per request).

from pipeline_plugin_i18n import PipelinePluginI18n

# Set to Polish
PipelinePluginI18n.set_locale("pl")

Getting the Locale

from pipeline_plugin_i18n import PipelinePluginI18n

current_locale = PipelinePluginI18n.get_locale()
print(current_locale)  # Output: "pl"

Custom Translations

You can register your own translations for any Condition or Match handler.

from pipeline import HandlerMode, Match, Pipeline

from pipeline_plugin_i18n import PipelinePluginI18n

PipelinePluginI18n.register_handler(
    handler=Match.Text.Letters,
    translations={
        HandlerMode.ROOT:
            {
                "en": Match.Text.Letters.ERROR_TEMPLATES[HandlerMode.ROOT],
                "pl": lambda self: "Musi zawierać tylko litery (np. Aaaaa)."
            }
    },
)

Supported Languages

  • English (en)
  • Polish (pl)

Metadata

Release files for krywok-pipeline-plugin-i18n 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for krywok-pipeline-plugin-i18n 1.0.1
File Size Uploaded Provenance Actions
krywok_pipeline_plugin_i18n-1.0.1.tar.gz 9.7 kB With provenance Details for krywok_pipeline_plugin_i18n-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for krywok-pipeline-plugin-i18n 1.0.1
File Interpreter ABI Platform Actions
krywok_pipeline_plugin_i18n-1.0.1-py3-none-any.whl Python 3 none any Details for krywok_pipeline_plugin_i18n-1.0.1-py3-none-any.whl

Total release size: 20.6 kB

Release files / krywok_pipeline_plugin_i18n-1.0.1.tar.gz

Download URL krywok_pipeline_plugin_i18n-1.0.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7e21cf2499296fa91ac0c72039890452db06c30d491af6977444d9cce0bc5f35
BLAKE2b-256 checksum
How to use checksums
f03896e42e2f54023353d8869f77299cdf18f720b15b0d41d362a792df8c66a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / krywok_pipeline_plugin_i18n-1.0.1-py3-none-any.whl

Download URL krywok_pipeline_plugin_i18n-1.0.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4d346a51a895a78ec47f53d1fc6e558bdc5b0324c1c5f2a94d84b505904a9a5
BLAKE2b-256 checksum
How to use checksums
4829c4f825a4565e55c26bb95ff06d39f838f5062f0eec1def44e0ef35518041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Security for krywok-pipeline-plugin-i18n 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for krywok_pipeline_plugin_i18n-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page