User:Sophivorus/sandbox

= Cross-wiki modules = A cross-wiki module is a Lua module designed to be usable in every wiki with exactly the same code. Cross-wiki modules are easy to adopt by new wikis and can be easily kept updated across Wikimedia wikis using the Synchronizer tool.

To become cross-wiki, modules must provide ways for wikis to localize everything they need to localize, without having to touch the code of the module itself. This page describes several techniques to accomplish this.

= Global vs cross-wiki = Global refers to things (modules, templates, gadgets, etc) that live in a single wiki, but can be used in every wiki, similar to how files live in a single wiki (Commons) but can be used in every wiki. Cross-wiki, on the other hand, refers to things that are copied exactly the same in several wikis.

Modules
Global modules do not exist yet and are not possible with current technology. Cross-wiki modules, however, are possible and do exist. They can be easily maintained using the Synchronizer tool, so that cross-wiki modules are almost as convenient as global modules would be.

Templates
Global templates and cross-wiki templates do not exist, and given the way cross-wiki modules work, neither makes much sense. If a template wants to become cross-wiki, usually the best approach is to become a cross-wiki module.

Gadgets
Global gadgets and cross-wiki gadgets both exist. Proveit is an example of a global gadget, while xxx is an example of a cross-wiki gadget.