Skip to content

Localization Support#2565

Merged
texodus merged 2 commits intomasterfrom
localization
Mar 12, 2024
Merged

Localization Support#2565
texodus merged 2 commits intomasterfrom
localization

Conversation

@texodus
Copy link
Member

@texodus texodus commented Mar 12, 2024

Adds localization support to integer, float, date and datetime Perspective types, and add parameterized text via CSS custom variables for all UI text in the <perspective-viewer> app.

Also includes CSS language files for de, es, fr, ja, pt and zh locales, as per Google Translate, which does a hilariously bad job at translating some of Perspective's jargon-y prose, ergo these language files are un-supported and included for demo purposes only. Contributions from native speakers welcome, but please fix the entire file in one PR.

The template for internationalized text is in intl.less, with individual languages in the intl/ directory. For example, by adding this to your documents's <head>:

<link rel="stylesheet" crossorigin="anonymous" href="@finos/perspective-viewer/dist/css/intl/ja.css" />

... and settings your Browser's locale to ja, you'll get a wildly inaccurate translation to Japanese:

Screenshot 2024-03-12 at 3 54 39 AM

@texodus texodus added the enhancement Feature requests or improvements label Mar 12, 2024
@texodus texodus merged commit 02deb58 into master Mar 12, 2024
@texodus texodus deleted the localization branch March 12, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests or improvements

Development

Successfully merging this pull request may close these issues.

1 participant