English language returned
The page https://www.genesys-pgr.org/de/c/banana shows the crop text in English.
It makes a call to https://api.genesys-pgr.org/api/v1/crops/banana/details.
Making the API call to https://api.genesys-pgr.org/de/api/v1/crops/banana/details would return the text in German.
An approach may be:
export const loadCropDetails = (shortName: string) => (dispatch, getState) => {
console.log(`Loading crop details in lang: ${getState().applicationConfig.lang}`);
return dispatch(apiLoadCropDetails(getState().applicationConfig.lang, shortName));
};
But the state.applicationConfig.lang
doesn't always contain the selected language.