Skip to content

Feature: Localization Support #23

@sfmskywalker

Description

@sfmskywalker

Description

Elsa Studio currently has hardcoded UI strings, which poses challenges for non-English users and limits the reach of the tool. Introducing localization support will make Elsa Studio more accessible to a global audience.

Goals

  1. Replace hardcoded strings with a mechanism that supports multiple languages.
  2. Ensure that the solution is maintainable, scalable, and allows community contributions for new language support.

Proposed Solutions

There are several ways to handle localization in Blazor applications. Here are some of the popular methods:

  1. Embedded Resources: This approach involves creating .resx files for each supported language. These resource files can be embedded in the application, and Blazor has built-in support for using them. It's a common .NET approach and might be familiar to many .NET developers.

    Pros:

    • Strong IDE support, especially in Visual Studio.
    • Built-in .NET support.

    Cons:

    • Might be cumbersome when dealing with large amounts of text.
    • Requires a rebuild of the application for adding new languages or updating existing translations.
  2. PO Files: PO files are a popular choice for localization, especially in the open-source world. They are easy to understand, and there are tools available for translation management.

    Pros:

    • Simple and human-readable format.
    • Allows for easy community contributions without requiring a rebuild of the app.
    • There are various tools available for managing PO files.

    Cons:

    • Requires additional libraries for integration with Blazor.
  3. JSON/JS Libraries: Use JavaScript libraries like i18next in combination with Blazor JS interop. This approach involves storing translations in JSON files.

    Pros:

    • Can leverage a wide range of existing frontend localization tools.
    • Flexible and can be used in combination with other frontend components if needed.

    Cons:

    • Might be a bit overkill and require more JS interop than the other methods.

Recommendation

Given the nature of Elsa Studio being primarily a Blazor application, and the strong support of .NET for embedded resources, I would suggest starting with Embedded Resources. It provides a balance of familiarity for .NET developers and built-in support.

However, if there's a strong inclination towards community-driven translations and avoiding application rebuilds, PO Files would be a compelling choice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions