The correct sentence is "Los dos idiomas", because "idioma" is a masculine noun --> EL IDIOMA (not "la idioma"), so the article must always conform to the noun. "Los dos idiomas", "las tres casas" (LA CASA, feminine noun), "los siete libros" (EL LIBRO, MASCULINE NOUN). Also when there's a number behind the noun, the article (LO, LOS, LA, LAS) always agrees with the noun.