I think that it would be faster to not `setItem` here right away. If the user is happy with the language in `documentL10n.supportedLocales[0]` then it means that the language negotiation worked out well and the next time they visit they should get the same language version.

You only need to store and retrieve the preferred locale in the localStorage if it's different from `documentL10n.supportedLocales[0]`.  But this sounds like a separate issue and a separate pull request.