code: public void setBidiGlobalDir(int bidiGlobalDir) {
      Preconditions.checkArgument(
          bidiGlobalDir >= -1 && bidiGlobalDir <= 1,
          "bidiGlobalDir must be 1 for LTR, or -1 for RTL (or 0 to leave unspecified).");
      Preconditions.checkState(
          !useGoogIsRtlForBidiGlobalDir || bidiGlobalDir == 0,
          "Must not specify both bidiGlobalDir and useGoogIsRtlForBidiGlobalDir.");
      this.bidiGlobalDir = bidiGlobalDir;
    }
docs: Sets the bidi global directionality to a static value, 1: ltr, -1: rtl, 0: unspecified. If 0,
  and useGoogIsRtlForBidiGlobalDir is false, the bidi global directionality will actually be
  inferred from the message bundle locale. This is the recommended mode of operation when
  shouldGenerateGoogMsgDefs is false. When shouldGenerateGoogMsgDefs is true, the bidi global
  direction can not be left unspecified, but the recommended way of doing so is via
  setUseGoogIsRtlForBidiGlobalDir(true). Thus, whether shouldGenerateGoogMsgDefs is true or not,
  THERE IS USUALLY NO NEED TO USE THIS METHOD!
  
  @param bidiGlobalDir 1: ltr, -1: rtl, 0: unspecified. Checks that no other value is used.