Skip to content

i18n: Expose translator language switching feature for integration #5453

Open
@almchung

Description

@almchung

How would this new feature help increase access to p5.js?

This proposes to extend our existing internationalization tool and exposes its features for future integration tasks (e.g. as discussed in p5.js web editor's issue #1943 with @outofambit ).

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Feature enhancement details:

  1. Expose the language switching function
    This mainly means to extend setTranslatorLanguage() from our i18n module [LINK]. p5._setTranslatorLanguage() can be a way to do this [LINK].
  2. Expose a function listing available translator language
    We will add p5._availableTranslatorLanguages() to query for the settings page to know which translations are supported in the sketch's version of p5.

Checklist:

  • Add p5._setTranslatorLanguage()
  • Add p5._availableTranslatorLanguages()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions