Indexing of Values for Language Variables

For Language Variables, the Value is not indexed. This is something that cannot be changed on the content type.

For our content managers that don’t have access to the VTL code to see what key is being used for a given text, this can make it difficult for them to find the Language Variable they need to modify.

If all they know is the text value being displayed, trying to use Search or searching within Language Variables by the value displayed won’t be able to find it by that alone (only if those words are included in the key).

Prior to the full implementation of Locales and Language Variables, the values and keys under Languages could be searched.

A work around is to export the Language Variables for a given language and look through the outputted spreadsheet.

The ability for Language Variable Values to be indexable would be helpful.

1 Like

I believe the values are indexed - they just don’t have a dedicated search from the listing screen. You can see that the general search box will return matching language variables that contain a specific value:

Maybe the issue lies in languages other than English, or the default language.

An example is with Espanol (ES). Values containing “¡Bienvenido!” couldn’t be found by Searching.


At first, I thought it might be special character related issue. But, I’ve also tried with other words that don’t have special characters and still receive no results.

Seems like the punctuation is not getting tokenized because searching for Bienvenido works fine.

1 Like

Hi Will, what version are you on? We are on 24.12.27_lts_v3 and when I try searching for a specific language variable I get no results. Wondering if maybe we are on a different version than you which is why we are having a different experience.

Hi @Kyle , welcome to the dotCMS community!

I tried it on a local 24.12 LTS version and it seems to be working for me OK. I have one example of the Key in spanish and another with the value in spanish, then one with both. All seem to work Ok (without the punctuation).

I’m thinking your example may be a bug and we move to a support ticket so we can replicate your setup more completely to get to the bottom of it.

1 Like

If you want to post a bit more about your setup here we can try and replicate, from the screen shots everything looks right, maybe try the Site / Folder, or try switching language to All, in the advanced search on the left?

Thanks,

Thank you all for your feedback. @Kyle put in a ticket and was able to get direction that the Value field should be indexed and on how to make it indexable.

I hadn’t realized that if ‘User Searchable’ was deselected, we could gain access to enable ‘System Indexed’ on the content type. We did that and now can search Values.

Great, I’m glad support was able to figure it out. I didn’t think to look at the settings for the language variable content type - they are User Searchable by default but can be changed. Perhaps a little too much flexibility.

Thanks again David for posting the resolution!