I am using Spring framework with elasticsearch as the backend to store results such as item description, price, expert notes, etc. It is working perfectly for the English domain. I need to add additional language support for this. I have added the properties file for button labels and all the HTML markup except for the data in elasticsearch. I have the corresponding translation for the elasticsearch data. My question is how can I use this translated data? So far I have come up with the following options:
- Create separate elasticsearch index for the translated data and query the required field from this index for showing the translated text.
- Store the translated data in database and query that data at runtime for translation.
- Store the translated data in properties file and read these properties for translation.
Has anyone done this before? Are there any other options I didn't mention? What approach did you take?