Language parameter

Develop an international app that can be used in different languages. Enhance the search functionality with the language parameter so that the search returns results in a specific language.

Sample use case: If your mobile device is set to a particular language, you will see it in your app as well. Use the following code snippet to try this in your app.

JAVA
KOTLIN
1FuzzySearchEngineDescriptor fuzzySearchEngineDescriptor = new FuzzySearchEngineDescriptor.Builder()
2 .language(lang)
3 .build();
4return new FuzzySearchSpecification.Builder(text)
5 .searchEngineDescriptor(fuzzySearchEngineDescriptor)
6 .build();
1val searchEngineDescriptor = FuzzySearchEngineDescriptor.Builder()
2 .language(languageSelector.code)
3 .build()
4
5val fuzzySearchSpecification = FuzzySearchSpecification.Builder(term)
6 .searchEngineDescriptor(searchEngineDescriptor)
7 .locationDescriptor(locationDescriptor.build())
8 .build()