You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
Thank you so much for this awesome plugin. One thing though.... I recently added it to an existing site of mine and I came up with an SQL-Script that does two things:
It moves all stored data from "All languages" to en_GB
It copies existing fields to a new language (de_DE) in my case
I think this can be very useful for other users too, e.g. if add the plugin to an existing site or you add a new language and don't want to start from 0 with your settings.
Also it cleans up the "All languages"-data, which could be a good solution for Issue #37
If you tell me where and how you would like that information in your Readme, I am very happy to make the changes and open an Pull request for it.
The MySQL:
# Rename current options
UPDATE {YOUR_TABLE_PREFIX}options SET option_name = CONCAT('options_en_GB', TRIM(LEADING 'options' FROM option_name)) WHERE option_name LIKE 'options%';
UPDATE {YOUR_TABLE_PREFIX}options SET option_name = CONCAT('_options_en_GB', TRIM(LEADING '_options' FROM option_name)) WHERE option_name LIKE '_options%';
# Duplicate options
CREATE TEMPORARY TABLE tmptable_1 SELECT * FROM {YOUR_TABLE_PREFIX}options WHERE option_name LIKE 'options%' OR option_name LIKE '_options%';
UPDATE tmptable_1 SET option_id = NULL;
UPDATE tmptable_1 SET option_name = CONCAT('options_de_DE', TRIM(Leading 'options_en_GB' FROM option_name)) WHERE option_name LIKE 'options%';
UPDATE tmptable_1 SET option_name = CONCAT('_options_de_DE', TRIM(Leading '_options_en_GB' FROM option_name)) WHERE option_name LIKE '_options%';
INSERT INTO {YOUR_TABLE_PREFIX}options SELECT * FROM tmptable_1;
DROP TEMPORARY TABLE IF EXISTS tmptable_1;
# Show the results
SELECT * FROM {YOUR_TABLE_PREFIX}options WHERE option_name LIKE 'options%' OR option_name LIKE '_options%';
Thanks,
David
The text was updated successfully, but these errors were encountered:
Hi there,
Thank you so much for this awesome plugin. One thing though.... I recently added it to an existing site of mine and I came up with an SQL-Script that does two things:
I think this can be very useful for other users too, e.g. if add the plugin to an existing site or you add a new language and don't want to start from 0 with your settings.
Also it cleans up the "All languages"-data, which could be a good solution for Issue #37
If you tell me where and how you would like that information in your Readme, I am very happy to make the changes and open an Pull request for it.
The MySQL:
Thanks,
David
The text was updated successfully, but these errors were encountered: