+ // Decrement `q` if it is greater than 1.
+ if (q > 1) {
+ q--;
+ }
+
+ // Add a second entry for the language only portion of the locale.
+ localesStringBuilder.append(",");
+ localesStringBuilder.append(locale.getLanguage());
+
+ // Append `1;q=0.x`, which drops by .1 for each removal form the main locale until q=0.1.
+ localesStringBuilder.append(";q=0.");
+ localesStringBuilder.append(q);
+
+ // Decrement `q` if it is greater than 1.
+ if (q > 1) {
+ q--;
+ }