code: public boolean isRightToLeft() {
          String script = getScript();
          if (script.length() == 0) {
              // Fastpath: We know the likely scripts and their writing direction
              // for some common languages.
              String lang = getLanguage();
              if (lang.length() == 0) {
                  return false;
              }
              int langIndex = LANG_DIR_STRING.indexOf(lang);
              if (langIndex >= 0) {
                  switch (LANG_DIR_STRING.charAt(langIndex + lang.length())) {
                  case '-': return false;
                  case '+': return true;
                  default: break;  // partial match of a longer code
                  }
              }
              // Otherwise, find the likely script.
              ULocale likely = addLikelySubtags(this);
              script = likely.getScript();
              if (script.length() == 0) {
                  return false;
              }
          }
          int scriptCode = UScript.getCodeFromName(script);
          return UScript.isRightToLeft(scriptCode);
      }
docs: <strong>[icu]</strong> Returns whether this locale's script is written right-to-left.
  If there is no script subtag, then the likely script is used,
  see {@link #addLikelySubtags(ULocale)}.
  If no likely script is known, then false is returned.
  
  <p>A script is right-to-left according to the CLDR script metadata
  which corresponds to whether the script's letters have Bidi_Class=R or AL.
  
  <p>Returns true for "ar" and "en-Hebr", false for "zh" and "fa-Cyrl".
  
  @return true if the locale's script is written right-to-left