void print_time_conventions() { BFormattingConventions conventions; BLocale::Default()->GetFormattingConventions(&conventions); if (conventions.CountryCode() != NULL) { printf("%s_%s.UTF-8%s\n", conventions.LanguageCode(), conventions.CountryCode(), conventions.UseStringsFromPreferredLanguage() ? "@strings=messages" : ""); } else { printf("%s.UTF-8%s\n", conventions.LanguageCode(), conventions.UseStringsFromPreferredLanguage() ? "@strings=messages" : ""); } }
void FormatSettingsView::Refresh(bool setInitial) { BFormattingConventions conventions; BLocale::Default()->GetFormattingConventions(&conventions); if (setInitial) fInitialConventions = conventions; if (!conventions.Use24HourClock()) { f12HourRadioButton->SetValue(B_CONTROL_ON); fLocaleIs24Hour = false; } else { f24HourRadioButton->SetValue(B_CONTROL_ON); fLocaleIs24Hour = true; } fUseLanguageStringsCheckBox->SetValue( conventions.UseStringsFromPreferredLanguage() ? B_CONTROL_ON : B_CONTROL_OFF); _UpdateExamples(); }