Skip to content

I18n data#230

Draft
JayPanoz wants to merge 8 commits intodevelopfrom
i18n-data
Draft

I18n data#230
JayPanoz wants to merge 8 commits intodevelopfrom
i18n-data

Conversation

@JayPanoz
Copy link
Copy Markdown
Collaborator

This creates a JSON file for language-specific values in ReadiumCSS-base module so that they can be accessible to external consumers of ReadiumCSS.

A use case would be to adjust the value you submit for line height to the Preferences API in Navigators depending on the language, or adjust font-family putting the value in the selection as sort of a default value.

@mickael-menu
Copy link
Copy Markdown
Member

What would be the strategy for a RS to figure out which line height compensation to use? Here's an attempt:

  • Find the key with match the publication's full BCP-47 language + region code.
  • If no match, find the key after removing the region code (only BCP-47 language code).
  • If no match, use default (or ignore, because the line height compensation should be 1).

@JayPanoz
Copy link
Copy Markdown
Collaborator Author

Yeah that makes sense as I treated it like this lately as it was the most obvious way to do it.

We'd better document it for clarity. I am also thinking about the case where Latin may not be the default script of the app, in which case we should warn to not blindly apply this logic.

Abstract the rule for app/publication instead of treating non-latin-based apps as outliers.
Comment thread css/vars/CSS-Variables.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants