whole_func_string: function getAvailableLocalesOf(service) {
    var available = %AvailableLocalesOf(service);
  
    for (var i in available) {
      if (HAS_OWN_PROPERTY(available, i)) {
        var parts = InternalRegExpMatch(
            /^([a-z]{2,3})-([A-Z][a-z]{3})-([A-Z]{2})$/, i);
        if (!IS_NULL(parts)) {
          // Build xx-ZZ. We don't care about the actual value,
          // as long it's not undefined.
          available[parts[1] + '-' + parts[3]] = null;
        }
      }
    }
  
    return available;
  }
func_code_string: function getAvailableLocalesOf(service) {
    var available = %AvailableLocalesOf(service);
  
    for (var i in available) {
      if (HAS_OWN_PROPERTY(available, i)) {
        var parts = InternalRegExpMatch(
            /^([a-z]{2,3})-([A-Z][a-z]{3})-([A-Z]{2})$/, i);
        if (!IS_NULL(parts)) {
          // Build xx-ZZ. We don't care about the actual value,
          // as long it's not undefined.
          available[parts[1] + '-' + parts[3]] = null;
        }
      }
    }
  
    return available;
  }
func_documentation_string: Returns an Object that contains all of supported locales for a given
  service.
  In addition to the supported locales we add xx-ZZ locale for each xx-Yyyy-ZZ
  that is supported. This is required by the spec.