Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #492
Closed
Open
Issue created Jun 06, 2013 by Administrator@rootContributor

Implement language fallback

Created by: mattflaschen

For instance, if the code requests a locale of de-CH, it should fallback to de, since currently there is no de-CH. This is an IETF language tag, an extension of ISO 639-1.

That way, you can just request any language without knowing what's implemented. And if a de-CH localization is added later, it will just work a little better, without the client code changing anything.

Fallback to English already works for when you request something like zh which isn't implemented at all.

You may be able to import the fallback configuration from MediaWiki. They have fallbacks configured (e.g. https://git.wikimedia.org/blob/mediawiki%2Fcore.git/d7a61d72231861755f0ccdaf80d7b4388cebd5df/languages%2Fmessages%2FMessagesMwl.php has a fallback to 'pt'), except when the fallback is to English.

Note that they are often circular, though ('pt' falls back to 'pt-br', which falls back to 'pt').

Assignee
Assign to
Time tracking