-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Is your feature request related to a problem? Please describe.
Currently, the search result language is hardcoded to English within the application. This means that regardless of the user's system language or personal preference, the search results are always displayed in English. This is a significant limitation for non-English speaking users or those who prefer to receive search results in their native language, which negatively impacts the user experience and international usability.
Describe the solution you'd like
I propose that the hardcoded language setting for search results be externalized into a user-configurable parameter.
Instead of having the language fixed in the code, it should be read from a configuration file (e.g., config.yaml, .env, or a JSON config file). This would allow users to easily specify their desired search result language.
For example, the configuration could look something like this:
# Supported language codes could be 'en-US', 'zh-CN', 'fr-FR', 'de-DE', etc. search_language: 'zh-CN' Ideally, the application could also support a default or 'auto' setting to use the system's locale if no specific language is set by the user.Describe alternatives you've considered
UI-based Language Selector: Adding a dropdown menu in the application's settings UI to select the search language. This would be more user-friendly for non-technical users but might involve more significant development effort.
Automatic Detection Only: The application could automatically detect the user's operating system language and use that for search results. While this is an improvement over a fixed English setting, it doesn't allow users to override the language if they want results in a language different from their system's setting.
The proposed solution of using a configuration file is a good first step, as it's relatively simple to implement and provides the necessary flexibility for users to customize their experience.
Additional context
Upon inspecting the source code, I've noticed that the language parameter (likely 'en' or a similar ISO 639-1 code) for the search API call is hardcoded. Moving this to a configuration file would be a clean and effective way to decouple this setting from the application logic.
This change would greatly enhance the application's accessibility and appeal to a global user base.