Translates the alignment value.

@param   alignment   the alignment value
@return  the translated value
325261
public static String getAlignment(int alignment) {
        switch(alignment) {
            case Element.ALIGN_LEFT:
                return HtmlTags.ALIGN_LEFT;
            case Element.ALIGN_CENTER:
                return HtmlTags.ALIGN_CENTER;
            case Element.ALIGN_RIGHT:
                return HtmlTags.ALIGN_RIGHT;
            case Element.ALIGN_JUSTIFIED:
            case Element.ALIGN_JUSTIFIED_ALL:
                return HtmlTags.ALIGN_JUSTIFIED;
            case Element.ALIGN_TOP:
                return HtmlTags.ALIGN_TOP;
            case Element.ALIGN_MIDDLE:
                return HtmlTags.ALIGN_MIDDLE;
            case Element.ALIGN_BOTTOM:
                return HtmlTags.ALIGN_BOTTOM;
            case Element.ALIGN_BASELINE:
                return HtmlTags.ALIGN_BASELINE;
                default:
                    return "";
        }
    }
602760
public void setLineTranslateAnchor(@Property.LINE_TRANSLATE_ANCHOR String value) {
    PropertyValue propertyValue = lineTranslateAnchor(value);
    constantPropertyUsageMap.put(PROPERTY_LINE_TRANSLATE_ANCHOR, propertyValue);
    layer.setProperties(propertyValue);
  }
727588
public Locale getLocaleOrDefault(String language) {
        String lang = getLanguageOrDefault(language);
        return Locale.forLanguageTag(lang);
    }
810294
String getMatchingJavaEncoding(String javaEncoding) {
        if (javaEncoding != null && this.javaEncodingsUc.contains(javaEncoding.toUpperCase(Locale.ENGLISH))) {
            return javaEncoding;
        }
        return this.javaEncodingsUc.get(0);
    }
329187
public static String translate(String tag)
    {
        String cn = translator.get(tag);
        if (cn == null) return tag;
        return cn;
    }
623174
public void setTitleAlignment(final TextAlignment ALIGNMENT) {
        if (null == titleAlignment) {
            _titleAlignment = ALIGNMENT;
            fireTileEvent(RESIZE_EVENT);
        } else {
            titleAlignment.set(ALIGNMENT);
        }
    }
1122711
function (translationKey, translationDefaultValue) {
            if (regexName !== "JavascriptServiceArraySimpleQuote" &&
              regexName !== "JavascriptServiceArrayDoubleQuote") {
              if (keyAsText === true && translationDefaultValue.length === 0) {
                results[translationKey] = translationKey;
              } else {
                results[translationKey] = translationDefaultValue;
              }
            }
          }
561002
def _parse_alignment(alignment):
    

    align_flags = None
    for qt_align in alignment.split('|'):
        _, qt_align = qt_align.split('::')
        align = getattr(QtCore.Qt, qt_align)

        if align_flags is None:
            align_flags = align
        else:
            align_flags |= align

    return align_flags
724707
private void align() {
		max = aligner.getPair().getLength();
		score = aligner.getPair().getNumIdenticals();
		aligner = null;
	}
1005606
public void setAlign(String align) throws ApplicationException {
	align = StringUtil.toLowerCase(align);
	if (align.equals("left")) this.align = Table.ALIGN_LEFT;
	else if (align.equals("center")) this.align = Table.ALIGN_CENTER;
	else if (align.equals("right")) this.align = Table.ALIGN_RIGHT;
	else throw new ApplicationException("value [" + align + "] of attribute align from tag col is invalid", "valid values are [left, center, right]");
    }
1131353
@Override
    @GwtIncompatible("incompatible method")
    public int translate(final CharSequence input, final int index, final Writer out) throws IOException {
        for (final CharSequenceTranslator translator : translators) {
            final int consumed = translator.translate(input, index, out);
            if(consumed != 0) {
                return consumed;
            }
        }
        return 0;
    }
1082046
private short getAlignment(String value)
    {
        short ret = ALIGN_LEFT;

        if(value.equals("centre"))
            ret = ALIGN_CENTRE;
        else if(value.equals("left"))
            ret = ALIGN_LEFT;
        else if(value.equals("right"))
            ret = ALIGN_RIGHT;
        else if(value.equals("justify"))
            ret = ALIGN_JUSTIFY;
        else if(value.equals("fill"))
            ret = ALIGN_FILL;

        return ret;
    }
691625
public static function align(string $align) : string {
		if (empty($align)) $align = 'left';
		if (I18n::rtl()) {
			if ($align == 'left') {
				$align = 'right';
			} else if ($align == 'right') {
				$align = 'left';
			}
		}
		return $align;
	}
885294
private static String translateFormat(String formatString, Map<String, String> mapping, String escapeStart, String escapeEnd, String targetEscapeStart, String targetEscapeEnd) {
		int beginIndex = 0;
		int i = 0;
		char lastChar = 0;
		char currentChar = 0;
		String resultString = "";
		char esc1 = escapeStart.charAt(0);
		char esc2 = escapeEnd.charAt(0);

		for (; i < formatString.length(); i++) {
			currentChar = formatString.charAt(i);
			if (i > 0 && lastChar != currentChar) {
				resultString += mapSubformat(formatString, mapping, beginIndex, i, escapeStart, escapeEnd, targetEscapeStart, targetEscapeEnd);
				beginIndex = i;
			}
			lastChar = currentChar;
			if (currentChar == esc1) {
				i++;
				while (i< formatString.length() && formatString.charAt(i) != esc2) {
					i++;
				}
				resultString += targetEscapeStart;
				resultString += formatString.substring(beginIndex+1, i);
				resultString += targetEscapeEnd;
				i++;
				if (i < formatString.length()) {
					lastChar = formatString.charAt(i);
				}
				beginIndex = i;
			}
		}
		
		if (beginIndex < formatString.length() && i <= formatString.length()) {
			return resultString + mapSubformat(formatString, mapping, beginIndex, i, escapeStart, escapeEnd, targetEscapeStart, targetEscapeEnd);
		} else {
			return resultString;
		}

	}
240376
public Map<String, Translation> getTranslations() {
        Map<String, Translation> map = new HashMap<>();
        for (Map.Entry<TranslationId, Translation> translationEntry : translations.entrySet()) {
            map.put(translationEntry.getKey().getLocale(), translationEntry.getValue());
        }
        return map;
    }
416729
def _fetch_AlignmentMapper(self, tx_ac, alt_ac=None, alt_aln_method=None):
        

        if alt_ac is None:
            alt_ac = self._alt_ac_for_tx_ac(tx_ac)
        if alt_aln_method is None:
            alt_aln_method = self.alt_aln_method
        return super(AssemblyMapper, self)._fetch_AlignmentMapper(tx_ac, alt_ac, alt_aln_method)
830233
function alignment(value, index) {
  var start = value.lastIndexOf(lineFeed, index)
  var end = value.indexOf(lineFeed, index)
  var char

  end = end === -1 ? value.length : end

  while (++start < end) {
    char = value.charAt(start)

    if (
      char !== colon &&
      char !== dash &&
      char !== space &&
      char !== verticalBar
    ) {
      return false
    }
  }

  return true
}