Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization Support #2565

Merged
merged 2 commits into from Mar 12, 2024
Merged

Localization Support #2565

merged 2 commits into from Mar 12, 2024

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
13 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant