insanebear Developer De Poland Miembro desde oct. 2014 insanebear 18 mar. 2020 22:25 Is there a way to prepare translation to add-on that is automatically added to database after files upload to ftp (bypassing csv import)?
tim Founder De Sweden Miembro desde may. 2013 tim 19 mar. 2020 00:17 Not really, no :( I recommend a CSV.
skoruppa LiteCart Fan De Poland Miembro desde ago. 2018 skoruppa 2 abr. 2020 17:26 This is not exactly what you asked but I'm doing something like that in my add-on { language::translate(__CLASS__ . ':not_selected', 'You need to select a destination locker'); $this->set_translation('pl', __CLASS__ . ":not_selected", 'Musisz wybrać docelowy paczkomat'); } public function uninstall() { database::query( "delete from " . DB_TABLE_TRANSLATIONS . " where code like '%" . __CLASS__ . "%';" ); } public function set_translation($language_code, $key, $text) { $check_column_query = database::query("SHOW COLUMNS FROM " . DB_TABLE_TRANSLATIONS . " where field = 'text_" . $language_code . "'"); $check_column = database::fetch($check_column_query); if ($check_column) { database::query( "update " . DB_TABLE_TRANSLATIONS . " set `text_" . $language_code . "` = '" . $text . "', date_updated = '" . date('Y-m-d H:i:s') . "' where code = '" . $key . "';" ); } }```
tim Founder De Sweden Miembro desde may. 2013 tim 2 abr. 2020 20:41 language::translate(CLASS.':yada_yada', '...') is something that is recognized by the translation scanner. Admin -> Translations -> Scan. Why not instruct your client to scan the platform for new translations?