VisualEditor/Design/Internationalization requirements

'''This is a work in progress. Even the first chapter is not fully written.'''

This is a draft document of internationalization requirements for the Visual editor.

Requirements for RTL and bidi text are written separately in the Visual editor/Bidirectional text requirements.

General
It is becoming more and more important to use the HTML lang attribute as much as possible. The WebFonts extension uses it to apply the correct font. Firefox uses it to apply correct punctuation style and starting at version 10 it will (probably) use it to apply the correct spelling checker to a textarea. Mobile devices may use to show the appropriate on-screen keyboard. Machine translation software may use it for correct translations.

In Wikipedia and in other projects text is often written in a mix of languages. For example, an encyclopedic article may be written in English and include names in foreign spelling, quotations of foreign literary works, titles of foreign-language books, etc.

It can be applied to almost any HTML element - the generic  and  , and also  ,   ,  , , ,   , etc.

Current situation
Currently MediaWiki automatically applies the lang attribute to the element.

To indicate elements in other languages it can be manually. This is done haphazardly - either using raw HTML tags or templates such as w:en:Template:Lang and its many derivatives, such as w:en:Template:Lang-sl, w:en:Template:Nihongo, s:en:Template:GHGheb etc. Needless to say, in every project they are implemented separately and differently, if at all.