Morocco took the French language as the official language on March 30, 1912 (Treaty of Fez, when Morocco became a French protectorate). French was given up for Moroccan Arabic since March 2, 1956 (independance).
Je déteste le français. To say "I hate French" (as in the French language) in French, you would say, "Je déteste le français." If you want to say "I hate the French" (as in the French people), you would say instead, "Je déteste les français."