Skip to content

Internationalization: Clarify fallback #42471

@erosman

Description

@erosman

MDN URL

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization

What specific section or headline is this issue about?

Localized string selection

What information was incorrect, unhelpful, or incomplete?

The explanation and examples on MDN don’t appear to clarify the following scenario.

  • _locales/en/messages.json (extension default)
{
  "colorLocalized": { "message": "colour" },
  "time": { "message": "Time" }
}
  • _locales/fr/messages.json
{
  "colorLocalized": { "message": "couleur" },
  "time": { "message": "Temps" }
}
  • _locales/fr_BE/messages.json (browser locale)
{
  "colorLocalized": { "message": "couleur" }
}

What would browser.i18n.getMessage('time') show, "Temps" or "Time"?

What did you expect to see?

Improved explanation

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions