solid-software / languagetool_textfield

🌐 Flutter text field that implements LanguageTool spellcheck.
BSD 3-Clause "New" or "Revised" License
34 stars 10 forks source link

Arabic Localization Suggestions list #70

Open Ali-Assi-AlGooru opened 1 year ago

Ali-Assi-AlGooru commented 1 year ago

I tried the same example in the repository, and it worked well with English. However, when writing Arabic words, the spell checker detected misspelled words, but the suggestions were unreadable.

I am not sure if Arabic is not supported in the package, or if this is a bug. I would appreciate your help with this.

Here's a screenshot showing this case:

Screenshot_2023-10-30-12-47-18-739

Lujain-M02 commented 9 months ago

hello, I am working on application and I need arabic spell checker. do you have any updates about this issue?

illia-romanenko commented 9 months ago

Hey, we don't have any plans to fix this (but it might change). In the meantime we would merge a PR with a fix if someone contributes.

Semsem-programmer commented 9 months ago

I solve that by edit (language_tool_client.dart) file as:

replace this line: json.decode(result.body) as Map<String, dynamic>,

With: json.decode(utf8.decode(result.bodyBytes)) as Map<String, dynamic>,

The Reason Json response do not work with arabic chars (UTF-8) by default.

Hint:

You can use my changes: https://github.com/solid-software/languagetool_textfield/pull/75