> take the apple
+diff --git a/manual/manual.asciidoc b/manual/manual.asciidoc index 5b2cfcb..82a2476 100644 --- a/manual/manual.asciidoc +++ b/manual/manual.asciidoc @@ -1,7 +1,7 @@ :doctitle: The ALAN Adventure Language Reference Manual -:revnumber: 0.1.98-PreReleaseBeta7 -:revdate: September 1, 2019 -:revremark: AsciiDoc conversion work +:revnumber: 0.1.99-PreReleaseBeta7 +:revdate: September 11, 2019 +:revremark: Beta7 Ed. work :doctype: book :encoding: utf-8 :lang: en diff --git a/manual/manual.html b/manual/manual.html index d77fe0f..fe9d219 100644 --- a/manual/manual.html +++ b/manual/manual.html @@ -441,9 +441,9 @@
To create adventures in languages other than English, there are a few separate issues to consider. -The sections below describes the support that Alan provides for each of them.
+When it comes to writing text adventures in languages other than English, the Alan IF system is a great choice. +Since Alan doesn’t enforce on authors a fixed world model nor a predefined set of verbs, its open-ended philosophy simplifies adapting Alan to other languages.
+To create adventures in languages other than English, there are a few issues that need to be taken into account first:
+Special characters support (letters with accents, diacritics, etc.).
+Handling of grammatical number, gender person and case.
+Defining Synonym
s for variations of the basic articles and prepositions.
Provide some initialization mechanism on all game instances to enforce grammatical consistency via custom attributes.
+Alan was designed around English as the default language, but implementing support for other languages should be a fairly easy task, thanks to Alan’s flexible design and syntax. +The best approach is to create a dedicated “grammar module” to supported your desired language, which can then be reused to create any adventure in that language. +Alan has already been successfully +localized to Italian, +so you could look at the Italian grammar module for inspiration.
+The sections below provide some guidelines and insight on establishing if Alan is able to support a given language, and which steps are required to implement a core grammar module to support that language. +Because every language is different, it’s impossible to provide a set of fixed guidelines; instead, we can provide practical examples of how specific features of other languages where (or could be) implemented in Alan.
+Before embarking on localizing Alan to a specific target language, you’re advised to:
+Study how other languages where implemented in Alan.
+Study how the target language was implemented in other IF systems (if any).
+Read Chapter V: Natural Language of The Inform Designer’s Manual (DM4), by Graham Nelson, which provides precious insights on how IF systems can handle different languages.
+Looking at how others have accomplished similar tasks is always a great source of inspiration.
Most languages have characters, or glyphs, other than the common ones used in English, like ö, Ñ or æ. -Alan uses a character encoding called ISO-8859-1 which allows for many characters (but not all) used in European and other countries.
+Many languages rely on characters (or glyphs) which are not found in the English alphabet, like ö, Ñ or æ. +Alan uses a character encoding called ISO-8859-1 (aka Latin1) which covers most characters (but not all) used in European and Western countries.
+To use these characters you just need to ensure that the adventure source files adopt this character encoding. +Most editors allow specifying a specific encoding, either when you save a file the first time, or through a dedicated menu entry, the settings panel or by associating a file extension with a specific encoding. +Some operating systems might allow you to define the default encoding.
+If the Alan source files are encoded using ISO-8859-1 they will be presented correctly when the game is run in graphical interpreters like WinArun and Gargoyle. +If you run the game in console mode, you must ensure that both your console program and your operating system are set (and able) to show characters using the ISO-8859-1 encoding — often just setting the correct encoding is not enough, because some console fonts might not contain all the special characters glyphs required, and will be unable to represent them. +Make sure that you also install the right console font, and to set it as your shell/CMD default font.
To make use of these characters you just need to make sure that the adventure text files use this character encoding. -Usually you can do this in the editor you are using, often when you save a file the first time, or there should be a setting in your operating system to define the default encoding.
+For languages with non-Latin alphabets, currently the only viable solution is to fallback on some romanization convention. +In the early years of the Internet, when Ascii was the standard charset in communications, many creative solutions were devised to allow communicating in non-Latin languages over BBSs, chats and (later on) via sms using only Ascii characters. +Many of these “chat alphabets” are still popular today, and you can find many tools to convert to and from them. +For example, there is the Arabish chat alphabet for Arabic, Volapuk for Russian, and Shlyokavitsa (or Maimunitsa) for Bulgarian — just to mention a few.
If the Alan source files are encoded using ISO-8859-1 they will be presented correctly when the game is run using e.g. WinArun. -If you run the games in console mode you have to ensure that both your console program and your operating system are set (and able) to show characters using the ISO-8859-1 encoding.
+Beware though that in Alan you won’t be able to freely mix letters, numbers and symbols as these alphabets do, for there are some strict rules on what is considered a valid player input token. +You’ll need to be creative, and find ways to adapt your needs to the restrictions of the Alan language.
- - | -
-
+TBD. +When creating adventures in a language not natively supported by Alan, one of the first things you’ll need to look into are the predefined player words (see Appendix E for more details). +
+
+For example, noise words are useful for defining words which should be ignored by the parser. +Articles are usually defined as noise since they are irrelevant in adventure games input, and it’s convenient that when the player types: +
+
+
+
+
+
+> take the apple +
+
+the parser will only have to process “take apple” (the article “the” having been discarded as noise). +If this wasn’t the case, then authors would have to define multiple syntaxes for every verb in order to account for the presence of the article — which, in terms of understanding player commands, doesn’t provide any meaningful information. +Some languages have many different articles forms, one for each number and gender combination, and unless these are defined as noise words they would lead to numerous alternative syntaxes in the adventure source. +
+
+If you’re adventure uses English as the base language, then you can define your noise words by making them synonyms of a known English noise word (e.g. “the” or “go”). +For example, with the Italian language we would define all possible articles as noise this way: +
+
+
+
+
+
+
+This line of code ensures that all Italian definite articles will be ignored by the parser (stripped away from the player input). +
+
+In this regard, it’s important that you study carefully the list of all the predefined player words in the supported languages, as found in Appendix E, to check that none of them conflicts with a needed word of your language. +Since these player words are hardcoded into Alan, you can’t change them nor undefine them. +This is the criteria for choosing the base language for your adventure. +
+
+Ultimately, whichever base language you choose is irrelevant, for you’ll be translating all the Alan messages, so the base language is going to be hidden away in the background of your adventure. +
+
+If you can use English without conflicts, then go for it since it’s the default language.
+To use another natively supported language (i.e. German or Swedish), just enable it via the
+
+
-
|
-
Text about using multiple names for the same objects & synonyms, and how the interpreter chooses which word to use when
+Text about using multiple names for the same objects & synonyms, and how the interpreter chooses which word to use when.
TBD.
Text about how the rigid word order (verb first, possibly prefixed with a noun) that Alan imposes.
-Or does it?
-With the noun first is it possible to implement “das buch nehmen” with the syntax take = (o) nehmen
?
Some languages require (or allow) commands where the parameter precedes the verb.
+For example, in German the command for “take the book” would be:
+(literally, “the book take [it]”) where the parameter occurs in first position, requiring the following Syntax
definition:
Syntax take = (o) nehmen.
+Here are some links to useful resources for localizing Alan to other languages.
+Alan Italian — Alan 3 support for Italian via a core grammar module, and an Italian port of the Alan Standard Library.
+The Inform Designer’s Manual (4th Ed.) by Graham Nelson, 2001:
+ +