     }
 
     /**
-     <#Description#>
-
-     - returns: <#return value description#>
+     Returns a string containing the current locale's preferred languages in a prioritized manner to be used in a accept-language header.
+     Format example:
+     
+     "da;q=1.0, en-gb;q=0.8, en;q=0.7"
+
+     - returns: A string
      */
     public func acceptLanguageHeaderValueString() -> String {
         guard configured else {


     - returns: Translations dictionary for the given language.
     */
    public func findTranslationMatchingLanguage(language: String?, inJSON json: [String : AnyObject]) -> [String : AnyObject]? {
        guard configured else {
            print(NStackError.Translations.NotConfigured.description)
            return nil
        }

        // FIXME: Improve, remove unnecessary casts, cleanup

        // Intentionally passed nil to get the first language in the file
        guard let language = language else {

            // json.keys.flatMap({$0})
            if let keys = (json as NSDictionary).allKeys as? [String] {
                return json[keys[0]] as? [String : AnyObject]
            }

            return nil
        }

        for (key, _) in json {
            if (key as NSString).substringToIndex(2) == (language as NSString).substringToIndex(2) {
                return json[key] as? [String : AnyObject]
            }
        }

            }
            if languageJSON == nil {
                // No English translation, just use whatever the first one is
                languageJSON = json.first
            }
        }
        
