CSU/UC minimum requirement is 2 years. UC’s recommend 3 years to be competitive. Taking AP French could fulfill a language GE requirement depending upon the campus and major.
For the UC’s, AP French will give 5.3 semester units or 8 quarter units towards French Language and Culture.
Some UC’s will not allow AP credits to be used for GE requirements so you need to check each UC campuses AP policy.
ie. UC Davis
AP credit cannot be used to satisfy the campus general education (GE) requirements, except as they may be applied to the English Composition component of the Literacy with Words and Images requirement.
CSU’s are usually more generous but again check each schools policy on AP credits.
You have to check each campus for its foreign language graduation requirement. Some or all of the following may be options, depending on the campus (or division at the campus):
Sufficiently high AP score.
Completion of high enough level college course.
Completion of high enough level high school course.
Sufficiently high placement by the college’s language department.