// Copyright (c) 2020 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/common/language_util.h" #import #include #include #include "base/strings/sys_string_conversions.h" namespace electron { std::vector GetPreferredLanguages() { __block std::vector languages; [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(NSString* language, NSUInteger i, BOOL* stop) { languages.push_back(base::SysNSStringToUTF8(language)); }]; return languages; } } // namespace electron