308
edits
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Ubiquity's Parser 2 was written from the ground up with one of its greatest priorities being internationalization... not just making commands localizable, but actually making it so Parser 2 can be easily taught the grammars of other languages. Key to this undertaking is an idea from the [http://en.wikipedia.org/wiki/Principles_and_parameters Principles and Parameters] school of linguistics, that all languages' grammars are made up of the following: (from wikipedia) | Ubiquity's Parser 2 was written from the ground up with one of its greatest priorities being internationalization... not just making commands localizable, but actually making it so Parser 2 can be easily taught the grammars of other languages. Key to this undertaking is an idea from the [http://en.wikipedia.org/wiki/Principles_and_parameters Principles and Parameters] school of linguistics, that all languages' grammars are made up of the following: (from wikipedia) | ||
* A finite set of fundamental '''principles''' that are common to all languages; e.g., that a sentence must always have a | * A finite set of fundamental '''principles''' that are common to all languages; e.g., that a sentence must always have a subject, even if it is not overtly pronounced. | ||
* A finite set of '''parameters''' that determine syntactic variability amongst languages; e.g., a binary parameter that determines whether or not the subject of a sentence must be overtly pronounced. | * A finite set of '''parameters''' that determine syntactic variability amongst languages; e.g., a binary parameter that determines whether or not the subject of a sentence must be overtly pronounced. | ||
Line 11: | Line 11: | ||
The result of this architecture is that it takes very little code to teach Parser 2 a new language. With a little bit of JavaScript and knowledge of and interest in your own language, you’ll be able to get at least rudimentary Ubiquity functionality in your language. Follow along in this step by step guide and please [http://ubiquity.mozilla.com/trac/ticket/662 submit your (even incomplete) language files]. | The result of this architecture is that it takes very little code to teach Parser 2 a new language. With a little bit of JavaScript and knowledge of and interest in your own language, you’ll be able to get at least rudimentary Ubiquity functionality in your language. Follow along in this step by step guide and please [http://ubiquity.mozilla.com/trac/ticket/662 submit your (even incomplete) language files]. | ||
== Set up your environment == | |||
If you’re new to Ubiquity core development, you’ll want to first read the [https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial Ubiquity Development Tutorial] to learn how to get a live copy of the Ubiquity repository using [http://en.wikipedia.org/wiki/Mercurial Mercurial]. | |||
As you read along, you may find it beneficial to follow along in some of the more complete language settings files included in Parser 2: [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/modules/parser/new/en.js English], [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/modules/parser/new/ja.js Japanese], [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/modules/parser/new/da.js Danish]. | |||
== The structure of the language file == |
edits