- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.Scheduling library for HTML5 & JavaScript.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Change a language on demand
Read 485 times

Annes   Offline
YaBB Newbies
*
Posts: 5
I Love MindFusion!


   
     
 
Change a language on demand
Jun 4th, 2018 at 3:50pm
 
Hello,

I have a question about changing language manually.
I'm working on an application multilanguage and the issue is when a user choose a language from the list of language availble; at this time the language of keyboard must be changed. I tried to find the action thats help me to change the language of MindFusion virtual keyboard on demand but I didn't find it Sad.

Thank you in advance.
Sincerly,
Annes
 
 
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1474
Gender: male
tech.support


   
     
 
Re: Change a language on demand
Reply #1 - Jun 5th, 2018 at 6:24am
 
Hi,

If only for your own process, setting keyboard.InputLocale should change the language too.

If StandAlone mode is enabled the keyboard follows active application's current language and InputLocale automatically updates to reflect it once you activate another app. If you need to change external app's input language, you should be able to by sending WM_INPUTLANGCHANGEREQUEST Windows message to the application's main window like PostMessage(hWnd, WM_INPUTLANGCHANGEREQUEST, INPUTLANGCHANGE_FORWARD, MYLOCALE);

Regards,
Slavcho
Mindfusion
 
 
 
IP Logged    
 
     

Annes   Offline
YaBB Newbies
*
Posts: 5
I Love MindFusion!


   
     
 
Re: Change a language on demand
Reply #2 - Jun 5th, 2018 at 12:26pm
 
Thak you. For the context of the application I just need to change the InputLanguageManager.Current.CurrentInputLanguage. With this change I do my job.

Sincerly,
Annes
 
 
 
IP Logged    
 
     

Annes   Offline
YaBB Newbies
*
Posts: 5
I Love MindFusion!


   
     
 
Re: Change a language on demand
Reply #3 - Jul 18th, 2018 at 4:16pm
 
I have another problem. You find bellow the code that I use it in code-behind to change the keyboard language:

Code:
<Grid x:Name="GridKeyboard" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <vk:VirtualKeyboard x:Name="KeyboardVirtual" HorizontalAlignment="Left" VerticalAlignment="Top" InputLocale="{Binding InputLocale,ElementName=wKeyboard}"/>



    </Grid>
 



Code:
public partial class KeyboardMiniMind_Window : UserControl, INotifyPropertyChanged
    {
        public KeyboardMiniMind_Window()
        {
            InitializeComponent();
            KeyboardVirtual.InputLocale = LanguageLocalizerApp.SelectedLanguage;
            KeyboardMindFusionVM vm = this.DataContext as KeyboardMindFusionVM;
            KeyboardVirtual.TemplateLayout = vm.GetCustomLayout();
            DataContext = vm;
        }
 



This change the keyboard language, but I change also the keyboard system language. In the context of my application, I must not change system keyboard lanaguage.

Could you please find another way for changing the keyabord language without changing system keyboard language.

Thank you.

Sincerely,
Annes
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print