def get_parent_language(lang):
	"""If the passed language is a variant, return its parent

	Eg:
		1. zh-TW -> zh
		2. sr-BA -> sr
	"""
	is_language_variant = "-" in lang
	if is_language_variant:
		return lang[:lang.index("-")]