Forum .LRN Q&A: Small script for exporting i18n from database to xml-file for all packages

Hi, I'm sure I read some time ago a post regarding a helpfull little script. I have of cource tried the search, but without any luck. Somebody rember this and have a link to the post?
thanx!
Cato,
that's funny, I'm pretty sure I posted that code snippet and now I can't even find it myself anymore...😊

Here it is:

foreach package_key [apm_enabled_packages] {
        lang::catalog::export_package_to_files $package_key
}

Let me know if you have any other questions!

Hi Peter,

so for the import-part I guess this would do it, right?:

foreach package_key [apm_enabled_packages] {
  lang::catalog::import_from_tcl_files $package_key
}

or maybe this is better, since its xml-files:

foreach package_key [apm_enabled_packages] {
  lang::catalog::import_from_files $package_key
}

Cato,
your last code suggestion is absolutely correct. On server startup the proc import_from_all_files_and_cache is invoked (see acs-lang/tcl/acs-lang-init.tcl) and this proc will load messages into the database for all enabled packages that have not yet had any messages loaded (we only ever want to do this once per package for a server installation).