1. move everything to Postgres 2. move everything to common database, with tables foo_cur, foo_old etc., where foo are language names 3. make single user table (needs some tweaking to allow slightly different preferences), single logging system, single recent changes, and all other nice things we can do with that 4. move everything to UTF-8, so we don't have to use %escapes in English Wikipedia 5. create table interwiki (source_lang, target_lang, source_title, target_title) 6. convert all cur_text by removing interwiki links from page tops, and add apropriate entries to interwiki. 7. compute transitive symmetric closure of foo_interwiki, and display that as interwiki links. If there will be many articles of the same language in it display it like: "English (Astronomy), English (Astrophysics), German" In practive it shouldn't be such a big problem. 8. when editing add interwiki links on top of page or in separate box. add Javascript button to add all from links from transitive symmetric closure of interwiki 9. add some magic functionality that allows changing many interwiki links at time. It is needed as transitive symmetric closure often contains many copies of the same. "delete all interwiki links to this page" and "change all interwiki links from X to Y" would probably be enough.
Computing symmetric transitive closure will require a bit of magic. I think we should keep results in database and change only - editing may be a bit slower, as long as viewing is not any worse than now.