Amazon Vinyl
    Preparing search index...

    Function resolvePreferredLanguages

    • Resolves the preferred-language option to an ordered list of BCP 47 tags, most-preferred first.

      • a string becomes a single-element list
      • an array is used as-is (already ordered)
      • null falls back to the platform's navigator.languages order — null means "use the platform preference", not "no preference"
      • an empty list (empty array, or navigator.languages unavailable) means no preference: keep all languages

      Parameters

      • preferred: string | readonly string[] | null

      Returns readonly string[]