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

[Languages]: Support different language sets #87

Open
c0nst4ntin opened this issue Jan 12, 2025 · 3 comments
Open

[Languages]: Support different language sets #87

c0nst4ntin opened this issue Jan 12, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@c0nst4ntin
Copy link
Collaborator

As someone on Discord suggested, the current implementation can cause problems for people from GB, Australia, or Canada, where some words might be spelt differently than in the US. Then Aspell will detect things that shouldn't be detected.

I just found the option --extra-dicts with which we can support US English and GB English, etc., at the same time. 
But it does not let us switch languages. So we can't say English and German, for example.

With aspell -a --lang=en_US --extra-dicts=en_GB it accepts both spellings of initialise, whereas just one would always throw a mistake:

image

We could either add this as default flags in the Aspell class or add it as a config value as was suggested in #45

@benjam-es
Copy link
Contributor

I think this is still an issue for anyone with a computer no uk or us languages on their machine

I have update the branch in case it is revisited

@c0nst4ntin
Copy link
Collaborator Author

If we allow the value to be configurable you can put in any Aspell local you want. If they are not from the same language, there will be an exception but that way you could put en_US and en_GB or just de_DE 🤔

I am german myself and all projects I have seen so far use English. Just sometimes single german words when working with different APIs.

@c0nst4ntin c0nst4ntin added the enhancement New feature or request label Jan 12, 2025
@benjam-es
Copy link
Contributor

Thats what the previous PR did.

See here: https://github.com/peckphp/peck/compare/main...benjam-es:peck:feature/language?expand=1

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

No branches or pull requests

2 participants