Is there anyway to work around the 2 year langauge requirement

I got a d grade on my 2nd semester of the 2nd year of my french program. Is there anyway for csu or ucs to not look at the 2 year language requirment

No, you need a C or better for both CSUs and UCs. You’ll have to retake it.

Yes, there is an alternative. I am assuming you are a high school student planning for admission as a freshman. This is from the UC admissions website:
“Keep in mind that taking approved high school (“a-g”) courses isn’t the only way to satisfy these requirements. You also may meet them by completing college courses or earning certain scores on SAT, Advanced Placement or International Baccalaureate exams.”

You can satisfy the requirement with a minimum score of 540 on the SAT subject test for French, or a 3, 4, or 5 on the AP French exam.

I believe the SAT subject test and AP French exam cover more than 2 years of high school French?

A college course covering high school year 2 will be accelerated (i.e. one semester may cover a whole year) and OP had trouble…

If OP does not want the D to be calculated into the CSU/UC GPA, the class needs to be retaken. A SAT Subject test will not replace the grade.