LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] International configuration

[ILUG] International configuration

Kevin O Riordan kor at compsoc.com
Mon Mar 4 16:17:20 GMT 2002


Hi David,

here's a kludgy solution:

the file command seems to recognise different languages (kind of):

	hoth ~ ... cat english.txt 
	the 'file' command recognises loadsa languages !
	hoth ~ ... cat french.txt 
	La commande 'de fichier' reconnaît des langues loadsa!
	hoth ~ ... file english.txt 
	english.txt: English text
	hoth ~ ... file french.txt 
	french.txt: International language text

I dunno where it get's its language recognition from, it's not linked
against any fancy international libs - must be in glibc.

Anyways, given the above, you could use the following:

	if `file "$filename"|grep 'International language'` >/dev/null 2>&1
	then
		aspell_opts="$aspell_opts -d french"
	fi
	aspell $aspell_opts -c "$filename"


I'm sure file must be more useful than that, via magic(5) or glibc
internationalization (il8n ?) or whatever, but that's going beyond
my manpage-reading abilities ;)

Hope that helps a bit,
-kev



On Pungenday, the 63rd day of Chaos, Eoin Phillips gurgled:
> On Mon, Mar 04, 2002 at 02:37:44PM +0100, David Neary wrote:
> > And finally is it possible to get aspell to recognise the
> > language that a file is written in, and to get it to load the
> > appropriate language automagically? If not, how can I specify at
> > run-time the language to check with?
> 
> Don't know about recognising languages automatically, but the -d switch
> specifies which dictionary is used e.g.
>  aspell -d german -c filename.tex
> 
> Eoin
> 
> -- 
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie

-- 
if I can shoot rabbits, I can shoot fascists




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell