Skip to main content
Mohamed Hameed21513110
Inspiring
May 29, 2022
Question

Get Windows languages and put them inside DropDownList

  • May 29, 2022
  • 2 replies
  • 390 views

Get Windows languages and put them inside DropDownList


And when writing inside the text box.. it is written in the language that was chosen from the list

This topic has been closed for replies.

2 replies

Mohamed Hameed21513110
Inspiring
May 31, 2022

Is the situation too difficult?

Stephen Marsh
Community Expert
Community Expert
May 29, 2022

@Mohamed Hameed21513110 wrote:

A colleague here gave me the solution, but I did not understand it.

 

Perhaps it would be helpful to post the code?

Mohamed Hameed21513110
Inspiring
May 29, 2022

@Stephen Marsh 

I found this code but it doesn't work when the language is English
I want a code when writing inside the text that automatically makes the language Arabic

 

var dlg=
"dialog{text:'Script Interface',bounds:[100,100,470,170],"+
"test:EditText{bounds:[10,10,360,30] , text:'' ,properties:{multiline:false,noecho:false,readonly:false}},"+
"button1:Button{bounds:[10,40,350,60] , text:'Cancel' }};"
var win = new Window(dlg,'test');
win.center();

win.test.onChanging = function() {
     this.text = this.text.replace(/[^[\u0600-\u06FF\s0-9\p{N}]/, '');
 }
win.show();

 

The problem is that you are working on Windows and there is more than one language..and switching between them is difficult..especially when working on 100 cards.
I want to stick to only one language when writing name and address
I hope I conveyed what I want clearly 

Mohamed Hameed21513110
Inspiring
May 29, 2022

I searched and found an article on this topic but inside javascript
-- on focus change language input to Arabic automatic

I found this code but in javascript format

 

 

Using the attr function of jquery.
<input type="text" id="myClass" lang="arabisk" /> 
<script>
$(document).ready(function(){
    // change to arabic input language
    $(document).on('focus','.myClass',function(this){
        this.attr('lang', 'arbasic')
    });
    // change to english input language
    $(document).on('outfocus','.myClass',function(this){
          this.attr('lang', 'eng')
    });
});
</script>


Is there a code that does this?