Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot select other language than English #106

Closed
kubics opened this issue Jan 4, 2018 · 33 comments
Closed

Cannot select other language than English #106

kubics opened this issue Jan 4, 2018 · 33 comments
Labels

Comments

@kubics
Copy link

kubics commented Jan 4, 2018

I have installed SpellRight in latest VSCode 1.19.1 on Windows 10 Pro.

I do have Slovak language installed in "Country and region", which is not selected as Windows display language.
image

I do have also Slovak proofing tools (dictionary) installed in MS Office 2016 and I am using it for proofing.
image

However, SpellRight is still only offering English language. I have also tried "spellright.language": "sk-SK", user setting, but this did not help as well.
image

Thanks in advance for any advice.

@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Jan 4, 2018

Hmmmm, seems to work here:

image

You have restarted things of course?

@kubics
Copy link
Author

kubics commented Jan 4, 2018

Yes, I restarted several times. I have also tried to completely change my system language to Slovak, but nothing helps. I am x64 system with x64 office and x64 VSCode.

@bartosz-antosik
Copy link
Owner

Everything seems to be exactly as here (x64, English UI, etc., etc.). Let me meditate on this.

@bartosz-antosik
Copy link
Owner

Could you please try to install some other language for a test? Any wester from among those listed on my picture?

@kubics
Copy link
Author

kubics commented Jan 4, 2018

I have tried to install German as system language as well as proofing tools for office, but nothing changed. I have also found that French and Spanish proofing tools were also already preinstalled on my system, but I do not see them in VSCode.

@bartosz-antosik
Copy link
Owner

Do I understand correctly that no matter what you have installed you can see only English?

Could you try to set groupDictionaries to false?

@kubics
Copy link
Author

kubics commented Jan 5, 2018

Yes, you are right. I only can see English. After groupDictionaries set to false I see this:
image

@bartosz-antosik
Copy link
Owner

Incredible! I will try to prepare for you a test version which will dump some more debug information and as you to install it & pass the input. I see no other way to deal with this.

@bartosz-antosik
Copy link
Owner

I have installed Slovak on a second machine and it did not appear immediately in restarted VSCode. Had a hope to be able to debug the issue but after the reboot it has appeared. Tough case.

@bartosz-antosik
Copy link
Owner

I still cannot see anything that could be wrong with on the Spell Right's part.

Could you please do a test for me?

I have prepared a version with some small additional debug information printed. Please download:

https://drive.google.com/file/d/1Z2narKQ1gW26JxpQ1K83B6lyIpMrTpFe/view?usp=sharing

Then install it manually from VSIX file.

Then once you start VSCode please show Console of Developer Tools (Help -> Toggle Developer Tools) and there should appear an information for the loaded dictionaries:

image

Could you tell me what information is displayed there (all the lines that have form [spellright] Adding dictionary [xxx])?

@kubics
Copy link
Author

kubics commented Jan 8, 2018

Thanks for your effort. The console log contains exactly information corresponding to my options in listbox:
image

These 4 lines appear in the log after every single character I write into any file.

@bartosz-antosik
Copy link
Owner

It looks like the underlying layer, a library I am using from the very beginning of the time node-spellchecker
has some problem in some unspecified conditions. Very bad that I cannot reproduce this.

@bartosz-antosik
Copy link
Owner

You may please consider a workaround - there is a way to run the extension using hunspell spell checker instead of system spellchecker. Then you would have to download desired dictionaries like it is described in Linux and Windows 7 section.

To do this set environment variable SPELLCHECKER_PREFER_HUNSPELL (Right Click on My Computer -> Properties -> Advanced system settings -> Environment Variables... -> System variables OR User variables for XXX -> New... -> Variable name = SPELLCHECKER_PREFER_HUNSPELL, Variable Value = 1) - of course if you can set these (user rights).

Restart VSCode & then the extension should use HUNSPELL spelling API, not Windows native one.

@bartosz-antosik
Copy link
Owner

Just out of the blue: Do you have language switch in Taskbar ON?

image

@kubics
Copy link
Author

kubics commented Jan 8, 2018

Yes, I do. Currently looking like this:
image

@bartosz-antosik
Copy link
Owner

Last attempt! I have compiled a sample from here it dumps this on my machine:

image

Could you please download it here:

https://drive.google.com/file/d/1wwMP2DYb0v0wsotXzi8EIp-p8exT4ljx/view?usp=sharing

And then show me what does it dump on your machine?

@kubics
Copy link
Author

kubics commented Jan 8, 2018

Hmm, this is interesting. When I run it, I get this:
image

Now the questions is, whether I only have problem, because it is looking for DEBUG version of the library, or the problem would be there also without "D".

I have already tried to repair my office installation and also reinstalled or repaired all these C++ redistributables, but nothing helped. Could you build it for me in release mode? Or do you have another idea of what could be the problem?

EDIT:
BTW, both vcruntime140.dll and vcruntime140d.dll are there in my c:\windows\system32

THX

@bartosz-antosik
Copy link
Owner

Sorry. Default build settings in VS2017. No idea it could result in something like this. Here is built with defaults of Release settings:

https://drive.google.com/file/d/1GPtE1nNAtOrS2S46lBq0kWTB5o9MqwZ-/view?usp=sharing

@kubics
Copy link
Author

kubics commented Jan 8, 2018

Here is the result:

Available languages:
en-CA
en-LR
en-PH
en-US

From this it seems that your extension is OK but there is something with my system / office installation.

@bartosz-antosik
Copy link
Owner

By the looks of it. Gosh. For the moment I am officially out of ideas.

@bartosz-antosik
Copy link
Owner

Many thanks for the tests anyway.

@kubics
Copy link
Author

kubics commented Jan 9, 2018

Just to let you know... I have found out that languages offered to VS Code are absolutely independent on my office setup. I can even uninstall office completely and uninstall all language packs and proofing tools or I can make fresh install of the Office in SK language and it has no influence. Only languages that are offered are always the same languages that were preinstalled with windows and it doesn't matter whether there is proofing file for these languages or not.

Thanks for all your help. This seems to be some specific windows setup issue on my side.

I will rather try the hunspell now.

@bartosz-antosik
Copy link
Owner

Thanks for the update. I suppose, but have not been able to confirm this, that Office and Windows 8+ Spelling API are two independent things. Office works on other platforms (e.g. Windows 7) which do not have the Spelling API. Nevertheless I am disappointed about Windows. So far I had one unresolved issue #53 very similar to this. On the other hand there was the issue #23 which proofs that you can use multiple spelling languages on Single Language Windows edition...

I don't know how related this is but I have no Office installed. Just OneNote. Don't know whether this counts... ;-)

Looks like there is something possibly off course with spelling API.

I will close this thread. Shall you have any updates please post them here, maybe we will be able to reopen the issue with some solution.

@Magnati
Copy link

Magnati commented Sep 5, 2019

Hello @bartosz-antosik and @kubics ,

I ran into the same issue but found a solution.
The problem is that only admins can install certain parts of a language package under Windows 10.
In our case it is the "General Input" part of a language package which seems not to be installed when selected from a normal account.

So:

  1. you have to login via an admin-account
  2. their you go as described to settings->language&date->language, and add your preferred language
    • in contrary to a normal account, in an admin account, all additional supported icons (like handwriting, text-to-speech etc.) are listed in the overview
    • although, once a language is selected, you have several more checkboxes to select certain parts of the package to be installed or not
    • Note: You need to wait until the whole package is installed, the progress-bar is misleading because it shows only the install finalization of the obligatory "display language" part of the language package (because of course... :P ).
      You either wait until all supported icons (like handwriting, text-to-speech etc.) appear or you check yourself by click on the language from the list and check in the options window the installation status of each part of the package.
  3. once installed you can go to any normal account and spellright will find the new installed languages
    • this works even if the particular language is not installed in the normal account, but only the admin account!
      The new installed language will not even show up in the language settings of the normal account (because of course... :P )

On my system this behaviour was reproducible, and as a long time (annoyed) Windows user this feels kind of window-ish to me, which means it is probably intended behaviour.

Windows 10 Enterprise Version 1903
spellright version: 3.0.46
VS Code version: 1.38.0

However, I am not sure if this solution can be applied in some way to #53, so I posted it here. But for #194 and #256 this might be the solution too.

@bartosz-antosik
Copy link
Owner

@Magnati You are a genius! Yest all this seems annoying and total mystery to me!

@Magnati
Copy link

Magnati commented Sep 5, 2019

Thanks! :)

It would be good to get at least one confirmation in one of the three issues, but than you could add this hint to Your README.md

By the way, apart from the windows-holes-of-unfortune, thank you for this great package!

@bartosz-antosik
Copy link
Owner

Thank you! I will of course add this to README in next iteration!

bartosz-antosik added a commit that referenced this issue Sep 25, 2019
@M-orpheus
Copy link

I installed Chinese, but it didn't show up.
By the way, in "Microsoft Word", the spell-check package works correctly。

@Magnati
Copy link

Magnati commented Jan 7, 2020

@M-orpheus
Just to clarify: You installed from an admin account AND the chinese language package supports the "General Input" part?

@Tututuu
Copy link

Tututuu commented Apr 25, 2021

@Magnati Hello, how can you check whether the language package support the "General Input" part?

@AndreasLuckert
Copy link

How do you actually install a language/dictionary in this extension? In my case, not even English is offered. It's just empty when I run Spellcheck: Select dictionary (language)

@VipSaran
Copy link

VipSaran commented Apr 14, 2023

Just to let you know... I have found out that languages offered to VS Code are absolutely independent on my office setup. I can even uninstall office completely and uninstall all language packs and proofing tools or I can make fresh install of the Office in SK language and it has no influence. Only languages that are offered are always the same languages that were preinstalled with windows and it doesn't matter whether there is proofing file for these languages or not.

Thanks for all your help. This seems to be some specific windows setup issue on my side.

I will rather try the hunspell now.

Not specific to you as I have exactly the same problem with all the same steps reproducible up to this comment.

Setting SPELLCHECKER_PREFER_HUNSPELL removed all languages for me also.

Thanks to hints suggested here, I already had the "Language pack" installed, but what fixed it for me was installing "Basic typing" for the language:
image

After that VSC/SpellRight finally picked up Croatian.

@ATilland
Copy link

The solution of @Magnati solved my problem that was very similar. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants