Announcement

Collapse
No announcement yet.

Language Settings and Spelling - SOLUTION FOUND

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Language Settings and Spelling - SOLUTION FOUND

    In an effort to get a fully functional spell checker I have three languages installed:
    - British English (system language)
    - US English
    - Danish
    I would like the spell checker to recognize more than one language at once. In other words, use multiple dictionaries simultaneously. I'm sure that must be a common requirement as many people (possibly most) speak two languages. The GNU Aspell home page says:
    Other advantages over Ispell include support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once.
    but I can't figure out how to do that as there is only room for one choice in the dictionary setting! Is this a bug or is there some place else to configure this?

    #2
    Re: Language Settings and Spelling

    I'm having a bit of a problem with your problem. I use aspell, but I can't find separate aspell dictionaries for US English and British English. Aspell-am is Amharic; aspell-br is Breton; aspell-uk is Ukrainian. All I see in the repos is plain old aspell-en, which states that:
    American, British and Canadian spellings are included.
    There is an aspell-da, as I'm sure you know. The aspell documentation doesn't seem very helpful to me, but YMMV.

    Ispell actually uses different dictionaries for US and UK English (no joy for Canucks, though).

    Comment


      #3
      Re: Language Settings and Spelling

      Under "System Settings", "Regional & Language", we have "Spell Checker" with 13 choices for UK and 5 for Canada, among others. I also have one choice for Danish there. The question is how do I choose more than one at a time as promised in the Aspell documentation. I have looked in the repos but haven't found anything relevant there and that is not where languages are intended to be installed from in KDE as far as I know.

      I may be asking the impossible and the Aspell documentation perhaps does not apply to KDE. I am thinking that KDE did not do a complete implementation. I say that because a search brings up many questions from many people with similar needs, and no answers that I have found so far.

      Comment


        #4
        Re: Language Settings and Spelling

        I've spent some more time checking into this, and I still cannot come up with the elusive .aspell.conf file or anything similar. Not in /etc, not in /usr/etc, not in /usr/local/etc, all of which are suggested in the documentation. If there is a way to set multiple dictionaries in the GUI that would be fine too, but I've given up on that for now.

        What I am hoping to do is locate the configuration file which KDE is using for Aspell. It seems that the Aspell documentation does not apply to the KDE (or Kubuntu 8.04) version, or that I am not understanding something fundemental here. (likely )

        The command "aspell dump config" returns a file which says
        Code:
        # conf-dir (string)
        #  location of main configuration file
        # default: /etc
        but I still can't find it.
        Even the smallest clue as to where the configuration file can be found would be greatly appreciated?

        Comment


          #5
          Re: Language Settings and Spelling

          I'm testing a 'solution.' I'll post back when I'm done.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: Language Settings and Spelling

            Got it!

            I first looked at apt-cache show aspell which showed:
            Recommends: aspell-en | aspell-dictionary | aspell6a-dictionary
            Suggests: aspell-doc, spellutils
            I tried (as root) apt-get install --simulate aspell-en aspell-dictionary aspell6a-dictionary aspell-doc spellutils and got:
            Package aspell-dictionary is a virtual package provided by:
            aspell-uz 0.6.0-1
            aspell-uk 1.6.0-1
            .
            .
            .
            aspell-am 0.03-1-3
            You should explicitly select one to install.
            E: Package aspell-dictionary has no installation candidate
            So I removed that package and reran the command and got:
            Package aspell6a-dictionary is a virtual package provided by:
            aspell-no 2.0.10-3.1
            aspell-fi 0.7-17.1
            aspell-da 1.6.18-1.1
            You should explicitly select one to install.
            E: Package aspell6a-dictionary has no installation candidate
            So I removed that as well and got no errors. Simulation done, I ran the command for real:
            Code:
            apt-get install aspell-en aspell-doc spellutils
            and all went well. I opened a text document and clicked on Tools > Spelling and voila, Aspell she was a running!

            So, to identify the individual language dictionary packages that you want to install, just open a console and type:
            Code:
            apt-get install --simulate aspell-dictionary
            and you'll be presented with the possible choices. aspell6a-dictionary only points to the three language dictionary packages listed above.

            So, to recap, let's say you wanted to install the English, Danish, and Italian language dictionaries. You would run:
            Code:
            apt-get install aspell-en aspell-da aspell-it aspell-doc spellutils
            Additional language dictionaries would just be installed with:
            Code:
            apt-get install aspell-xx
            where xx is the string after the - and before the version number.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Language Settings and Spelling

              Thank you for going to all that trouble for me Snowhog! It is indeed very kind of you. I'm not sure where this gets me though. I already have the following packages installed:

              aspell
              aspell-da
              aspell-en
              libaspell15

              The problem is what do do from there. The aspell-en package, for example, contains many different dictionaries (see below) and I would like to choose two of those instead of just one, plus the single dictionary contained in the aspell-da package. In other words, my problem is not installing, but configuring.

              With proper configuration I should be able to type this very post with both American, British, or Danish words in it and have the same functionality that everyone (including me) enjoys with just one dictionary enabled. An example would be that "aeroplane" and "airplane" or "flyvemaskine" would be accepted, or given as replacement choices and not just one of them. All that is needed is to have all three dictionaries configured as active.

              According to the Aspell documentation it would appear that I should have many options including the following:
              Code:
              # extra-dicts (list)
              #  extra dictionaries to use
              but where is the .aspell.config file or where is the option in Kubuntu system settings? In the system settings window it is easy to change or install dictionaries, but it will only accept one choice at one time!

              Here is what happens when I try to do it according to the Aspell documentation:
              Code:
              $ aspell add-extra-dicts
              Error: Unknown Action: add-extra-dicts
              That idea came from here: http://aspell.net/man-html/Using-Mul...i-Dictionaries

              To sum up my plight: Aspell works like a charm in my Kubuntu installation, it just does not have any means of being configured other than choosing ONE dictionary.

              Here is the list of Aspell dictionaries available on my system:
              Code:
              $ aspell dump dicts
              da
              en
              en-variant_0
              en-variant_1
              en-variant_2
              en-w_accents
              en-wo_accents
              en_CA
              en_CA-w_accents
              en_CA-wo_accents
              en_GB
              en_GB-ise
              en_GB-ise-w_accents
              en_GB-ise-wo_accents
              en_GB-ize
              en_GB-ize-w_accents
              en_GB-ize-wo_accents
              en_GB-w_accents
              en_GB-wo_accents
              en_US
              en_US-w_accents
              en_US-wo_accents

              Comment


                #8
                Re: Language Settings and Spelling

                It appears that no .aspell.conf file is installed, either the global /etc/aspell.conf or personal ~/.aspell.conf. That said, I'd assume one just needs to build it - just a text file - based on the information provided by the man page:
                aspell(1) - Linux man page
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: Language Settings and Spelling

                  I'd assume one just needs to build it - just a text file - based on the information provided by the man page:
                  That looks like a viable suggestion and one which I haven't looked at yet. I was hoping it would be a little easier.

                  Well, (takes deep breath) it looks like I'm off on an adventure then! I'll report back.

                  Comment


                    #10
                    Re: Language Settings and Spelling

                    I haven't achieved my original goal of having several dictionaries recognized simultaneously in Aspell, but I've got a couple of solutions that make spell checking excellent for me.

                    From my searching on the net, it does not look like it is possible to use multi dictionaries with Aspell unless they are part of the same language. I did find a promise of a script on one site, but it was not easy to implement and was for command line use of Aspell only - a good idea but not what I was looking for right now. Also, the Aspell manual seems to be for programmers and does not have much user level information. In a lot of searching, I did not come up with a single example of a configuration file, only a couple of people had tried making one and they didn't achieve the multi lingual result they were looking for.

                    Regarding the use of Aspell across the KDE system: that does not seem to be happening either. It was a misconception on my part which I got from making assumptions about the Kubuntu System Settings which I thought would be global. I found that changes in Kubuntu did not effect either Open Office or Firefox. Global settings for languages in KDE is enticing, but people who use several languages, and there must be millions of them, will have to wait. But read on ...

                    Open Office has it's own configuration, and under language and spelling it has a wonderful selection. Go to "Tools - Options - Language Settings - Writing Aids - Check in All Languages". All installed dictionaries can be chosen individually, including an option for all! I tried that setting and both English and Danish words were underlined if incorrect. The changes take effect immediately. That Open Office does that, is a major win as far as I am concerned. W00t!

                    When it comes to Firefox I was back to only using one language. My version is 3.0.14 and I found that changes to my language preferences were not effective. However going to "about:config" found the culprit and I changed it there. After a restart it will now recognize my language of choice. The next problem was Danish. That is where I really need the checker because there are too many words that I have to look up, either on the net or in a book. However, I discovered a quicker method. Right clicking in a text window, such as I am writing in now, will bring up a menu with "Languages" at the bottom. This allows quick and immediate changes to the language setting. There's another win!

                    So, I learnt a couple of things and got the basic functionality that I wanted.

                    Comment


                      #11
                      Re: Language Settings and Spelling

                      Excellent. Well, another example of how one can accomplish things in Linux. Glad you found a solution, even if it wasn't what you were originally looking/hoping for. If you are satisfied, return to your OP and click the modify button and add SOLVED (or SOLUTION FOUND) to the subject line.
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Re: Language Settings and Spelling

                        Found a site that contain Aspell language dictionary tarballs for both, version 0.50 and 0.60. If a particular dictionary isn't available via apt-get install or Synaptic (or other package manager), this site might be useful.

                        Available Aspell Dictionaries
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment

                        Working...
                        X