com.alecdorrington.megalingual

Members list

Type members

Classlikes

enum Direction(val attribute: String)

A direction a language is written in.

A direction a language is written in.

Value parameters

attribute

The value of HTML's dir attribute for the direction.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Flag(markup: String)

A flag as SVG markup, drawn in a 60 by 40 view box. Each language draws its own (Language.flag) with the shapes here.

A flag as SVG markup, drawn in a 60 by 40 view box. Each language draws its own (Language.flag) with the shapes here.

Value parameters

markup

The SVG document, from to.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Flag

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Flag.type
trait Language

A language, perhaps a variety of another.

A language, perhaps a variety of another.

Languages form a tree of any depth: a language's parent is the broader language it is a variety of (British English of English), and nothing is read from a code's shape. A broader language is read in its first variety where a more specific one is needed.

Each language is an object saying all there is of it, a Language.Root or a Language.Variety, which takes from its parent what it does not say. Megalingual's are all there are, each in a file of its own in the languages package: Language.all lists them, and this companion holds each as a language (Language.German).

An app supporting only some languages says so with a Localised, and never matches on every language itself, so that a language added breaks no app.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Root
object Arabic
object Bengali
object Bulgarian
object Catalan
object Chinese
object Croatian
object Czech
object Danish
object Dutch
object English
object Estonian
object Filipino
object Finnish
object French
object German
object Greek
object Hebrew
object Hindi
object Hungarian
object Indonesian
object Italian
object Japanese
object Korean
object Latvian
object Lithuanian
object Malay
object Norwegian
object Persian
object Polish
object Portuguese
object Romanian
object Russian
object Serbian
object Slovak
object Slovenian
object Spanish
object Swahili
object Swedish
object Tamil
object Thai
object Turkish
object Ukrainian
object Urdu
object Vietnamese
class Variety
object Cantonese
object GermanGerman
object SwissGerman
Show all
object Language

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Language.type
object Localised

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Localised.type
final class Localised[+A]

What an app has in each language it supports, such as its interface's text. A language outside them is read in the nearest one: its first supported variety, else its parent's nearest, else the default.

What an app has in each language it supports, such as its interface's text. A language outside them is read in the nearest one: its first supported variety, else its parent's nearest, else the default.

The languages are a partial function's domain, so that an app names only those it supports, never every Language, and what it has in one is made only once that one is read.

Type parameters

A

What the app has in each language.

Value parameters

default

The language read in when nothing chooses another.

values

What the app has in each language it supports.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Plural

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Plural.type
enum Plural

A plural category, by which a language chooses the form of what it counts, as Unicode's CLDR defines them. A language uses only some (Language.plural): English One and Other, Polish One, Few and Many.

A plural category, by which a language chooses the form of what it counts, as Unicode's CLDR defines them. A language uses only some (Language.plural): English One and Other, Polish One, Few and Many.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Substitution(pattern: String, replacement: String)

A regular-expression substitution, by which a language writes some of what its parent does otherwise (ß as ss).

A regular-expression substitution, by which a language writes some of what its parent does otherwise (ß as ss).

Value parameters

pattern

What it replaces, as a Java regular expression.

replacement

What each match becomes, in which $1 to $9 stand for the text of the pattern's groups, and \ makes the next character plain ($).

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Substitution

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type