Chris Johnson wrote:The project name is stored in the database in english
[...]
If we internationalise searching we have to get all the projects from the database in that location , translate each one into that char's language (which involves several more database queries), then search the translations and show the matches. - quite a few extra steps and a lot more queries
Now objects and clothes are already available for translation - but a Polish speaker is probably not going to want to search for a "screwdriver" but a for a "śrubokręt" so the search query is going to have to run on the translated names not the original english ones
Now there are ways around this for generic items - we can cache translated names and we can search the translation tables instead of the object details tables but it's still further overheads - and not straight forward
- get all the projects from the database in that location (1 query)
- translate each one into that char's language (1 query per each project name)
- then search the translations for matches with the player's query (1 query per each translation)
- and show the matches.
I'm not a DB specialist, but maybe this other way could be faster:
Assuming there is a table (PNTT) for the translations of project's names...
- query against the PNTT for the projects of which names in the char's language matches the search (1 query)
- get all the projects in that location that matches the english names obtained in the previous query (1 query per each project's name)
- and show the matches.