I want to set the lang.ui based on the gscope1 parameter so that we can vary the language strings in the FTL file without having to provide a specific lang.ui querystring parameter. We are on FB 15.10
The code I have in the preprocess hook file is below but it is not working. The inputParameterMap shows lang.ui as present but the language strings are not changing when the results page is rendered.
Language parameters are populated before the pre-process hook script runs (see: Redirect Notice).
This means that you can’t add your language to the input parameters during this hook script because the population of other fields based on that has already occurred. You will need to set other data model elements instead of setting lang.ui=“cy” in your pre-process hook - probably question.locale = “cy”.
I will need to check with the developers if there are other fields that also need to be populated but a good guide is to run a query where you set the language normally and inspect the data model (look at search.json) to see what else is set.
Hi, many thanks. Will this have any unintended effects? We are using the gscope1 parameter for the multilingual search results and therefore only need to alter the language strings in the UI (via ui.*.cfg files)