Site.getLocale ()
function checks if language and country were specified for this site. if so, it returns the specified Locale-object otherwise it calls getLocale() for root

Sourcecode in Site/objectFunctions.js:
1:   function getLocale() {
2:      var locale = this.cache.locale;
3:      if (locale)
4:          return locale;
5:      if (this.preferences.getProperty("language")) {
6:         if (this.preferences.getProperty("country"))
7:            locale = new java.util.Locale(this.preferences.getProperty("language"),
8:                                          this.preferences.getProperty("country"));
9:         else
10:           locale = new java.util.Locale(this.preferences.getProperty("language"));
11:     } else
12:        locale = root.getLocale();
13:     this.cache.locale =locale;
14:     return locale;
15:  }