<commit_before>#include <atlbase.h>

#include <map>

#include "base/logging.h"
#include "base/string_util.h"

#include "setup_strings.h"

namespace {

// Gets the language from the OS.  If we're unable to get the system language,
// defaults to en-us.
std::wstring GetSystemLanguage() {
  static std::wstring language;
  if (!language.empty())
    return language;
  // We don't have ICU at this point, so we use win32 apis.
  LCID id = GetThreadLocale();
  int length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME, 0, 0);
  if (0 == length)
    return false;
  length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME,<commit_msg>Instead of returning false we should default to en-us when we fail to get locale.<commit_after>#include <atlbase.h>

#include <map>

#include "base/logging.h"
#include "base/string_util.h"

#include "setup_strings.h"

namespace {

// Gets the language from the OS.  If we're unable to get the system language,
// defaults to en-us.
std::wstring GetSystemLanguage() {
  static std::wstring language;
  if (!language.empty())
    return language;
  // We don't have ICU at this point, so we use win32 apis.
  LCID id = GetThreadLocale();
  int length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME, 0, 0);
  if (0 == length) {
    language = L"en-us";
    return language;
  }
  length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME,
{'fraction_non_alphanumeric': 0.11681547619047619, 'fraction_numerical': 0.01636904761904762, 'mean_word_length': 4.037453183520599, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3820014', 'n_tokens_mistral': 476, 'n_tokens_neox': 446, 'n_words': 147}