XPATH with variables

Dear @@4280-kazurayam
i have tried the provided solution without success if you tied it please provide me with your stepes since what i want to have that index variable to declare it in my code if it’s 1 refer to English and 2 refer to Arabic that’s it.