Thalassicus
Bytes and Nibblers
How can I skip execution of a sql file?
I have about 120 files containing translations of my project text. These add 46 seconds to game load time. All but the chosen language can obviously be skipped, which cuts time down to 3 seconds. I tried skipping the file by producing an error from inserting an already-existing value into a table, but discovered it is not possible to use a WHERE clause for an INSERT INTO statement, so I can't make this depend on a value set by the user elsewhere.
On a related question, is it possible to automatically detect the local language? I currently have users set it with a setting in my options.sql file:
INSERT INTO Civup (Type, Value) VALUES ('LANGUAGE', 'EN_US');
I have about 120 files containing translations of my project text. These add 46 seconds to game load time. All but the chosen language can obviously be skipped, which cuts time down to 3 seconds. I tried skipping the file by producing an error from inserting an already-existing value into a table, but discovered it is not possible to use a WHERE clause for an INSERT INTO statement, so I can't make this depend on a value set by the user elsewhere.
On a related question, is it possible to automatically detect the local language? I currently have users set it with a setting in my options.sql file:
INSERT INTO Civup (Type, Value) VALUES ('LANGUAGE', 'EN_US');