Update spell files for Ubuntu locale names.
diff --git a/runtime/spell/check_locales.vim b/runtime/spell/check_locales.vim
new file mode 100644
index 0000000..fe7be93
--- /dev/null
+++ b/runtime/spell/check_locales.vim
@@ -0,0 +1,21 @@
+" Script to check if all the locales used in spell files are available.
+
+grep /sys env LANG/ */main.aap
+let not_supported = []
+for item in getqflist()
+  let lang = substitute(item.text, '.*LANG=\(\S\+\).*', '\1', '')
+  try
+    exe 'lang ' . lang
+  catch /E197/
+    call add(not_supported, lang)
+  endtry
+endfor
+
+if len(not_supported) > 0
+  echo "Unsupported languages:"
+  for l in not_supported
+    echo l
+  endfor
+else
+  echo "Everything appears to be OK"
+endif
diff --git a/runtime/spell/de/main.aap b/runtime/spell/de/main.aap
index 015b957..78dfaab 100644
--- a/runtime/spell/de/main.aap
+++ b/runtime/spell/de/main.aap
@@ -33,7 +33,7 @@
 all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
 
 $SPELLDIR/de.latin1.spl : $FILES
-        :sys env LANG=de_DE.ISO8859-1
+        :sys env LANG=de_DE.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
 
 $SPELLDIR/de.utf-8.spl : $FILES
diff --git a/runtime/spell/fr/main.aap b/runtime/spell/fr/main.aap
index b207b6e..a0cf374 100644
--- a/runtime/spell/fr/main.aap
+++ b/runtime/spell/fr/main.aap
@@ -25,7 +25,7 @@
 $SPELLDIR/fr.latin1.spl : $FILES
         :copy {force} fr_FR_latin1.aff fr_FR.aff
         :copy {force} fr_FR_latin1.dic fr_FR.dic
-        :sys env LANG=fr_FR.ISO8859-15
+        :sys env LANG=fr_FR.ISO-8859-15@euro
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
 
 $SPELLDIR/fr.utf-8.spl : $FILES
diff --git a/runtime/spell/gd/main.aap b/runtime/spell/gd/main.aap
index 658cbfc..55443ae 100644
--- a/runtime/spell/gd/main.aap
+++ b/runtime/spell/gd/main.aap
@@ -12,7 +12,7 @@
 all: $SPELLDIR/gd.latin1.spl $SPELLDIR/gd.utf-8.spl ../README_gd.txt
 
 $SPELLDIR/gd.latin1.spl : $FILES
-        :sys env LANG=gd_GB.ISO8859-1
+        :sys env LANG=gd_GB.ISO8859-15
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
 
 $SPELLDIR/gd.utf-8.spl : $FILES
diff --git a/runtime/spell/la/main.aap b/runtime/spell/la/main.aap
index 0cf1d8a..d981585 100644
--- a/runtime/spell/la/main.aap
+++ b/runtime/spell/la/main.aap
@@ -11,8 +11,11 @@
 
 all: $SPELLDIR/la.latin1.spl $SPELLDIR/la.utf-8.spl ../README_la.txt
 
+# NOTE: the la_LN.ISO-8859-1 locale is not available on Ubuntu.
+# Use the English one instead.
+
 $SPELLDIR/la.latin1.spl : $FILES
-        :sys env LANG=la_LN.ISO8859-1
+        :sys env LANG=en_US.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/la la" -c q
 
 $SPELLDIR/la.utf-8.spl : $FILES
diff --git a/runtime/spell/nb/main.aap b/runtime/spell/nb/main.aap
index f7805ea..4d445c0 100644
--- a/runtime/spell/nb/main.aap
+++ b/runtime/spell/nb/main.aap
@@ -12,11 +12,11 @@
 all: $SPELLDIR/nb.latin1.spl $SPELLDIR/nb.utf-8.spl ../README_nb.txt
 
 $SPELLDIR/nb.latin1.spl : $FILES
-        :sys env LANG=no_NO.ISO8859-1
+        :sys env LANG=nb_NO.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/nb nb_NO" -c q
 
 $SPELLDIR/nb.utf-8.spl : $FILES
-        :sys env LANG=no_NO.UTF-8
+        :sys env LANG=nb_NO.UTF-8
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/nb nb_NO" -c q
 
 ../README_nb.txt : README_nb_NO.txt
diff --git a/runtime/spell/nn/main.aap b/runtime/spell/nn/main.aap
index da71b20..efb0812 100644
--- a/runtime/spell/nn/main.aap
+++ b/runtime/spell/nn/main.aap
@@ -12,11 +12,11 @@
 all: $SPELLDIR/nn.latin1.spl $SPELLDIR/nn.utf-8.spl ../README_nn.txt
 
 $SPELLDIR/nn.latin1.spl : $FILES
-        :sys env LANG=no_NO.ISO8859-1
+        :sys env LANG=nb_NO.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/nn nn_NO" -c q
 
 $SPELLDIR/nn.utf-8.spl : $FILES
-        :sys env LANG=no_NO.UTF-8
+        :sys env LANG=nb_NO.UTF-8
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/nn nn_NO" -c q
 
 ../README_nn.txt : README_nn_NO.txt
diff --git a/runtime/spell/pt/main.aap b/runtime/spell/pt/main.aap
index 3d08faf..751fb95 100644
--- a/runtime/spell/pt/main.aap
+++ b/runtime/spell/pt/main.aap
@@ -29,7 +29,7 @@
         ../README_pt.txt
 
 $SPELLDIR/pt.latin1.spl : $FILES
-        :sys env LANG=pt_PT.ISO8859-1 LC_ALL=pt_PT.ISO8859-1
+        :sys env LANG=pt_PT.ISO-8859-1 LC_ALL=pt_PT.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/pt pt_PT pt_BR" -c q
 
 $SPELLDIR/pt.utf-8.spl : $FILES
diff --git a/runtime/spell/sv/main.aap b/runtime/spell/sv/main.aap
index 5634711..de8696e 100644
--- a/runtime/spell/sv/main.aap
+++ b/runtime/spell/sv/main.aap
@@ -1,6 +1,6 @@
 # Aap recipe for Swedish Vim spell files.
 #
-# Maintainer: Stefan Karlsson <stefan.74@comhem.se>
+# Maintainer: Mattias Winther <vim@mattias.winthernet.se>
 
 # Use a freshly compiled Vim if it exists.
 @if os.path.exists('../../../src/vim'):
@@ -14,30 +14,33 @@
 all: $SPELLDIR/sv.latin1.spl $SPELLDIR/sv.utf-8.spl ../README_sv.txt
 
 $SPELLDIR/sv.latin1.spl : $FILES
-        :sys env LANG=sv_SE.ISO8859-1
+        :sys env LANG=sv_SE.ISO-8859-1
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/sv sv_SE" -c q
 
 $SPELLDIR/sv.utf-8.spl : $FILES
         :sys env LANG=sv_SE.UTF-8
 		$VIM -u NONE -e -c "mkspell! $SPELLDIR/sv sv_SE" -c q
 
-../README_sv.txt : README_sv_SE.txt
+../README_sv.txt : LICENSE_sv_SE.txt
         :copy $source $target
 
 #
 # Fetching the files from OpenOffice.org.
 #
-OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $OODIR/%file%} sv_SE.zip
+OODIR = http://extensions.services.openoffice.org/e-files/1080/6
+:attr {fetch = $OODIR/%file%} ooo_swedish_dict_1.42.oxt
 
 # The files don't depend on the .zip file so that we can delete it.
 # Only download the zip file if the targets don't exist.
 sv_SE.aff sv_SE.dic: {buildcheck=}
         :assertpkg unzip patch
-        :fetch sv_SE.zip
-        :sys $UNZIP sv_SE.zip
-        :delete sv_SE.zip
-        :delete hyph_sv_SE.dic
+        :fetch ooo_swedish_dict_1.42.oxt
+        :sys $UNZIP ooo_swedish_dict_1.42.oxt
+        :delete ooo_swedish_dict_1.42.oxt
+        :delete {r} META-INF
+        :copy dictionaries/sv_SE.aff sv_SE.aff
+        :copy dictionaries/sv_SE.dic sv_SE.dic
+        :delete {r} dictionaries dictionaries.xcu description.xml
         @if not os.path.exists('sv_SE.orig.aff'):
             :copy sv_SE.aff sv_SE.orig.aff
         @if not os.path.exists('sv_SE.orig.dic'):
@@ -60,12 +63,12 @@
 
 check:
         :assertpkg unzip diff
-        :fetch sv_SE.zip
+        :fetch ooo_swedish_dict_1.42.oxt
         :mkdir tmp
         :cd tmp
         @try:
             @import stat
-            :sys $UNZIP ../sv_SE.zip
+            :sys $UNZIP ../ooo_swedish_dict_1.42.oxt
             :sys {force} diff ../sv_SE.orig.aff sv_SE.aff >d
             @if os.stat('d')[stat.ST_SIZE] > 0:
                 :copy sv_SE.aff ../sv_SE.new.aff
@@ -75,7 +78,7 @@
         @finally:
             :cd ..
             :delete {r}{f}{q} tmp
-            :delete sv_SE.zip
+            :delete ooo_swedish_dict_1.42.oxt
 
 
 # vim: set sts=4 sw=4 :
diff --git a/runtime/spell/sv/sv_SE.diff b/runtime/spell/sv/sv_SE.diff
index 73ed14b..6c83d49 100644
--- a/runtime/spell/sv/sv_SE.diff
+++ b/runtime/spell/sv/sv_SE.diff
@@ -1,9 +1,9 @@
-*** sv_SE.orig.aff	Thu Feb 23 20:02:32 2006
---- sv_SE.aff	Thu Feb 23 20:02:32 2006
+*** sv_SE.orig.aff	2010-05-20 21:31:54.000000000 +0200
+--- sv_SE.aff	2010-05-20 21:38:36.000000000 +0200
 ***************
 *** 6,7 ****
---- 6,22 ----
-  
+--- 6,21 ----
+  NOSUGGEST !
 + FOL  ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
 + LOW  ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
 + UPP  ßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞÿ
@@ -18,142 +18,27 @@
 + MAP cç
 + MAP yÿý
 + MAP sß
-+ 
-  SFX  A  Y  1
-***************
-*** 15,17 ****
   
-! SFX  C  Y  16
-  SFX  C  0  t  [aeiouyåäöé]
---- 30,32 ----
-  
-! SFX  C  Y  15
-  SFX  C  0  t  [aeiouyåäöé]
 ***************
-*** 30,32 ****
-  SFX  C  en nets en
-- SFX  C  0  net  nets [^e]n
-  SFX  C  0  nets  [^e]n
---- 45,46 ----
-***************
-*** 427 ****
---- 441,541 ----
-  SFX  T  el  la  el
+*** 649 ****
+--- 663,664 ----
+  SFX  t  el  la/WXZ  el
 + 
-+ # soundslike mapping from Aspell
-+ # swedish_phonet.dat - Swedish phonetic transformation rules for aspell
-+ # Copyright (C) 2000  Martin Norbäck  <d95mback@dtek.chalmers.se>
-+ # distributed under GNU GPL
-+ # version 0.2
-+ 
-+ SAL &	&
-+ SAL @	@
-+ SAL ANG(EIYÄÖ)-^	ANI	# förledet an- ska inte bli @-ljud
-+ SAL AGNO6	AKNO	# agnostiker osv.
-+ SAL AG(IE)-6	AK	# vokal+g(ie) ger ej j-ljud
-+ SAL A	A
-+ SAL BB-<	_
-+ SAL B	P
-+ SAL CCO-	K	# broccoli, piccolo
-+ SAL CC	KS	# successiv, access, succé
-+ SAL CH	&	# choklad osv.
-+ SAL CK	K	# ck -> k som vanligt
-+ SAL C(EIYÄÖ)-<	S	# c + mjuk vokal -> s
-+ SAL C	K	# c + annat -> k
-+ SAL DJ(UÄÖ)-	I	# djungel, djävel, adjö
-+ SAL DD-	_
-+ SAL D	T
-+ SAL EG(IE)-6	EK	# vokal+g(ie) ger ej j-ljud
-+ SAL E	E
-+ SAL É	E
-+ SAL FF	F
-+ SAL F	F
-+ SAL G(EIYÄÖ)-3	I	# g+mjuk vokal ger j-ljud
-+ SAL GG6	K
-+ SAL GN	@N	# ugn, lugn...
-+ SAL G	K
-+ SAL H(AOUÅEIYÄÖ)-^	H	# h i början av ord hörs
-+ SAL H(AUOÅEIYÄÖ)-	_	# annars stumt framför vokal
-+ SAL HJ	I	# hj->j (hjärta osv.)
-+ SAL H	H
-+ SAL IG(IE)-6	IK	# vokal+g(ie) ger ej j-ljud
-+ SAL I	I
-+ SAL J	I
-+ SAL K(EIYÄÖ)-^	&	# k+mjuk vokal ger sje-ljud
-+ SAL KJ	&	# kjol
-+ SAL K	K
-+ SAL LJU-	I	# ljuga, ljus
-+ SAL LL-	_
-+ SAL L	L
-+ SAL MM-	_
-+ SAL M	M
-+ SAL NG6	@
-+ SAL NN-	_
-+ SAL N	N
-+ SAL ORIGI8	ORKI	# specialfall
-+ SAL OG(IE)-6	OK	# vokal+g(ie) ger ej j-ljud
-+ SAL O	O
-+ SAL PROJEKT	PRO&EKT	# specialfall
-+ SAL PSALT<	SALT	# specialfall
-+ SAL PSALM<	SALM	# specialfall
-+ SAL PP-	_
-+ SAL P	P
-+ SAL Q	K
-+ SAL RGI$6	RGI	# inget j i slutet
-+ SAL RGA$6	RIA	# här är det däremot j (arga,färga)
-+ SAL RGE$6	RIE	# här också (Norge, överge)
-+ SAL RGS$	RIS	# rgs i slutet
-+ SAL RG$	RI	# rg i slutet
-+ SAL RD	T	# "blött" d
-+ SAL RN	N	# "blött" n
-+ SAL RT	T	# "blött" t
-+ SAL RLD	T	# värld
-+ SAL RL	L	# "blött" l
-+ SAL RS	&	# sje-ljud (fars, gärsgård)
-+ SAL RR-	_
-+ SAL R	R
-+ SAL SS-	_
-+ SAL SCHIZ6	SKITS	# specialfall
-+ SAL SCH6	&
-+ SAL SKJ	&	# skjorta, skjuta
-+ SAL SJ	&	# sje-ljud
-+ SAL S	S
-+ SAL TION9^	TION	# tionde
-+ SAL TION6	&ON	# station osv.
-+ SAL TT-	_
-+ SAL T	T
-+ SAL UG(IE)-6	UK	# vokal+g(ie) ger ej j-ljud
-+ SAL U	U
-+ SAL V	F
-+ SAL W	F
-+ SAL X9	KS
-+ SAL YG(IE)-6	YK	# vokal+g(ie) ger ej j-ljud
-+ SAL Y	I
-+ SAL ZZ	TS
-+ SAL Z	S
-+ SAL ÅTTIO9	OTIO	# specialfall (ej sje-ljud)
-+ SAL ÅRTION9	ORTION	# specialfall (r hörs)
-+ SAL ÅG(IE)-6	OK	# vokal+g(ie) ger ej j-ljud
-+ SAL Å	O
-+ SAL ÄG(IE)-6	EK	# vokal+g(ie) ger ej j-ljud
-+ SAL Ä	E
-+ SAL ÖG(IE)-6	ÖK	# vokal+g(ie) ger ej j-ljud
-+ SAL Ö	Ö
-*** sv_SE.orig.dic	Thu Feb 23 20:02:32 2006
---- sv_SE.dic	Thu Feb 23 20:02:32 2006
+*** sv_SE.orig.dic	2010-05-20 21:31:54.000000000 +0200
+--- sv_SE.dic	2010-05-20 21:31:54.000000000 +0200
 ***************
-*** 4317,4319 ****
-  dvaldes/S
+*** 11786,11788 ****
+  DVD
 ! dvs
-  dväljas/S
---- 4317,4319 ----
-  dvaldes/S
+  dväljas
+--- 11786,11788 ----
+  DVD
 ! #dvs Removed by Stefan.
-  dväljas/S
+  dväljas
 ***************
-*** 24490 ****
---- 24490,24554 ----
-  åvila/MS
+*** 31959,31960 ****
+--- 31959,32024 ----
+  korsning/ADGvY
 + 
 + # Additions by Stefan:
 + SEK
@@ -218,3 +103,4 @@
 + vard.
 + vd
 + vol.
+  korsningsfri/OY