Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Translate OptionsPresenter - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
mkoonstra
#1 Posted : Wednesday, June 20, 2012 9:43:24 AM
Rank: Member

Groups: Registered

Joined: 6/14/2012
Posts: 8
I am trying to edit the options of a RapidSpellAYT with the following code:

var optionsPresenter = new OptionsPresenter();

if (optionsPresenter.Show(null, SpellCheckerAYT.Options))
{
SpellCheckerAYT.Options.Save();
}

However, it is not shown in the correct GUI language. How can I change the language?
Jim
#2 Posted : Wednesday, June 20, 2012 3:36:31 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
You can do it using the rapidSpellDialog1.Texts.ApplyTo method, provided that rapidSpellDialog's GUILanguage has been set

See my post here please
http://keyoti.com/support/topic.asp?TOPIC_ID=1828
Jim

-your feedback is helpful to other users, thank you!

Evaluation Downloads
-your feedback is helpful to other users, thank you!


mkoonstra
#3 Posted : Thursday, June 21, 2012 4:37:31 AM
Rank: Member

Groups: Registered

Joined: 6/14/2012
Posts: 8
What if there is no dialog available to do that?
Jim
#4 Posted : Thursday, June 21, 2012 4:25:37 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
One thing you can do is set the texts manually


OptionsPresenter presenter = new OptionsPresenter();
presenter.CreateDialogViewOptions += new
Keyoti.RapidSpell.Event.CreateDialogViewOptionsEventHandler(delegate(object sender2,
Keyoti.RapidSpell.Event.CreateDialogViewOptionsEventArgs e2)
{
IDialogViewOptions newForm = new Keyoti.RapidSpell.DialogViews.WindowsFormsOptions();
newForm.OptionsFormCheckAsYouTypeText = "...."
....
e2.NewView = newForm;
});

there are lots of text properties in newForm you can set.

Or, you can create a new RapidSpellDialog just for this purpose - provided you don't call it's Check method (which you won't), it is lightweight, no dictionary is loaded or anything.

If that's no good, we can see about adding ApplyTo to the OptionsPresenter and giving you a new build.



-your feedback is helpful to other users, thank you!

Evaluation Downloads
-your feedback is helpful to other users, thank you!


egeerts
#5 Posted : Monday, August 7, 2017 10:45:42 AM
Rank: Newbie

Groups: Registered

Joined: 8/7/2017
Posts: 3
Jim wrote:
You can do it using the rapidSpellDialog1.Texts.ApplyTo method, provided that rapidSpellDialog's GUILanguage has been set

See my post here please
http://keyoti.com/support/topic.asp?TOPIC_ID=1828
Jim

<i>-your feedback is helpful to other users, thank you!</i>

Evaluation Downloads


This is an invalid link, I'm also trying to find how to alter the language from the options dialog to Dutch. Any tips?
(Or I can only create my own dialog like the sample..?)

Same goes for AutoCorrectionMap afaic.
Jim
#6 Posted : Tuesday, August 8, 2017 5:29:39 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Sorry it was a public holiday here yesterday, I'll answer you today.
-your feedback is helpful to other users, thank you!


Jim
#7 Posted : Tuesday, August 8, 2017 9:58:44 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Did you try setting the GUILanguage property in RapidSpellDialog to DUTCH? And yes you can set up your own texts using the code I posted earlier in this thread.

Regarding AutoCorrectionMap, I am afraid we don't have Dutch autocorrect data, but you can add your own -> https://keyoti.com/produ...ect%20Customization.htm


Here's the contents of that (broken) linked post

Quote:

How can I change my dialog options screen language?

I'm doing this, but it's not working:
Code:

this.rapidSpellDialog.GUILanguage = Keyoti.RapidSpell.LanguageType.FRENCH;
this.rapidSpellDialog.LanguageParser = Keyoti.RapidSpell.LanguageType.FRENCH;
this.rapidSpellDialog.UserDictionaryFile = Application.StartupPath + "\\Dictionaries\\fr\\custom-fr.dict";
this.rapidSpellDialog.DictFilePath = Application.StartupPath + "\\Dictionaries\\fr\\dictionary-fr.dict";           

this.rapidSpellDialog.OptionsPresenter.Show(this, this.rapidSpellDialog.Options);


I also tried the following method without success:
Code:

this.rapidSpellDialog.Texts.ApplyLanguage(Keyoti.RapidSpell.LanguageType.FRENCH, Keyoti.RapidSpell.LanguageType.ENGLISH);


What am I doing wrong?

Thanks for your help.






Hi, your usage of the dialog's presenter is clashing a bit I think. Easiest thing to do is use a new one

Code:

this.rapidSpellDialog.GUILanguage = Keyoti.RapidSpell.LanguageType.FRENCH;
this.rapidSpellDialog.LanguageParser = Keyoti.RapidSpell.LanguageType.FRENCH;
            OptionsPresenter presenter = new OptionsPresenter();
            presenter.CreateDialogViewOptions += new
Keyoti.RapidSpell.Event.CreateDialogViewOptionsEventHandler(delegate(object sender2,
Keyoti.RapidSpell.Event.CreateDialogViewOptionsEventArgs e2)
            {
                IDialogViewOptions newForm = new Keyoti.RapidSpell.DialogViews.WindowsFormsOptions();
                rapidSpellDialog1.Texts.ApplyTo(newForm);
                e2.NewView = newForm;
            });
            presenter.Show(this, this.rapidSpellDialog1.Options);


Best
Jim

<i>-your feedback is helpful to other users, thank you!</i>

Evaluation Downloads


-your feedback is helpful to other users, thank you!


egeerts
#8 Posted : Monday, August 14, 2017 10:24:29 AM
Rank: Newbie

Groups: Registered

Joined: 8/7/2017
Posts: 3
Thank you Jim. I realized that it had worked for one specific dialog but then the same dialog in another context it didnt seem to work, I probably didn't properly couple the elements or so, so, sorry about that.

Also thanks for the restored content concerning the broken link.

As far as other languages suggestions, thanks for that information; I knew that possibility yet wanted to be sure whether or not there would be out of the box support.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.