// translation rules for Spanish
// This file is UTF-8 encoded

// Conditional rules
// ?1  Castilian
// ?2  Latin America
// ?3  mbrola VZ1

.L01 l r y
.L02 b d g n m         // change [s] to [z] before these
.L03 f h j s y z r      // allow [B] [D] [Q] before these consonants
.L04 b v f p      // labials, nasals are [m]
.L05 g k          // velars, nasals are [N]
.L06 j w l r b d g n m p t k c

.group a
          a          a
          ai         aI
          ay (K      aI
          ay (_      'aI
          au         aU
          au (_      'aU


.group b
          b          b
       _) b ($unpr   b  // phoneme definition may change it to [B]
       _) b (L01A    b  // Only bl, br are allowed at start of word
       _) b (A       b
          b (A       B
          b (cY      B
          b (L03     B
       m) b          b
       n) b          b
          b (iA      b
          b (uA      b

.group c
          c          k
       _) c (L01A    k    // allow: cl cr  at start of word
       _) ch (A      tS   // allow _ch

          c (Y       T         // ce, ci
          ch         tS
A)	ck	k

.group d
          d          d
       _) d ($unpr   d  // phoneme definition may change it to [D]
       _) d (rA      d
       _) d (A       d
          d (A       D
          d (_       D
          d (cY      D
          d (L03     D
          d (v       D
       m) d          d
       n) d          d
       l) d          d
       r) d          d


.group e
          e          e
//          e (CK      E
          e (nK      E
          e (r       E
          e (Ch      e
      Ar) e          E
          ei         eI
          ey (K      eI
          ey (_      'eI
          eu         eU
          eu (_      'eU


.group f
          f          f
       _) f (L01A    f   // allow fl fr  at start of word


.group g
          g          g
       _) g ($unpr   g  // phoneme definition may change it to [Q]
       _) g (L01A    g
       _) gh (A      g  // allow _gh in foreign words
       _) gn (A      n
       _) g (A       g
          g (A       Q
          g (_       Q
          g (cY      Q
          g (L03     Q
       m) g          g
       n) g          g
          g (Y+      x        // ge gi


.group h
          h              // silent
       _) hi (A      j


.group i
          i          i
          i (A       j
       C) i (A       j
      gu) i (A       j
?!3    l) i (A       %i
?!3    r) i (A       %i


.group j
          j          x


.group k
          k          k
       _) k (L01A    k   // allow kl kr  at start of word


.group l
          l          l
ll	(_	l
       _) ll (A      l^  // allowe _ll
?2	_)	ll	(A	J^
?2	ll	j:
?2	n_)	ll	(A	dZ
          ll         l^



.group m
          m          m
       @) m (_       =m
       _) mn (em     n
       _) mb (A      mb


.group n
          n          n
          n (L04     m
          n (_L04    m
          n (L05     N
          n (_L05   N
          n (j       N
ny	(A	n^ // catalan words
_)	nh	(A	n

.group o
          o          o
          o (CK      O
          o (r       O
          o (Ch      o
      Ar) o          O
          oi         oI
          oy (K      oI
          oy (_      'oI
ou	ow

.group p
          p          p
       _) p (L01A    p   // allow  pl pr  at start of word
          p (t       p:
       _) ph     (A    f
ph	(@	f
          ph (K      f
       _) ps (i      s
       _) ps (eudo   s
       _) pt (ero    t
       _) pt (ol     t


.group q
          q          k
          qu    (Y     k // que, qui
_)	qw	(A	kw // qwerty


.group r
          r          r
          r (_       r
          r (t       r
       A) r (A       r
       C) r (A       r
       _) r (A       R
       l) r (A       R
       m) r (A       R
       n) r (A       R
       s) r (A       R
          rr         RR2


.group s
          s          s
       &) s (_S1     s
_)	s	(K@	s
          ss       s
       _) sh (A      S
       _) sh (L01A   S
          sh (K      S
?!1	sc	(Y	s // sce sci for non castilian accent

.group t
          t          t
       _) t (L01A    t  // all tr at start of word
	       _) th   (@      t
          th (K      t
_)	tx	(A	tS
tx	tS


.group u
          u          u
u	(u	u
          u (A       w
!?3    l) u (A       %u
!?3    r) u (A       %u
       g) u (e
       g) u (i
g)	u	(é
g)	u	(í

.group v
          v          b
       _) v ($unpr   b  // phoneme definition may change it to [B]
       _) v (L01A    b  // Only bl, br are allowed at start of word
       _) v (A       b
          v (A       B
          v (cY      B
          v (L03     B
       m) v          b
       n) v          b
          v (iA      b
          v (uA      b


.group w
          w          w
       _) wh (A      w


.group x
          x          ks
       _) x ($unpr   s      // ?
?!1	xc	(Y	ks	// xce xci for non castilian accent

.group y
          y          i
       _) y ($unpr   J
      _m) y    (A      j
      _l) y   (A       j
          y (A       j:
_)	y	(A	J^
u)	y	(K	j:
n_)	y	(A	dZ
y	(_	i

.group z
          z          T
?2        z (L02     z
zz	ts


.group
          á        ''a
          é        ''E
          í        ''i
          ó        ''O
          ú        ''u
          ü        u
          ñ        n^
          $          d'Olar

      _)  - (_D      m'EnOs
     A_)  - (_D      _
     C_)  - (_D      _

          , (D       kOma

