Sign in to follow this  
Followers 0
Emiel Wieldraaijer

Russian

12 posts in this topic

Hi all,

isn't it possible to add russian text like this in SciTE

потребность написать российский текст

I'm not russian .. but i tried .. and did only return ???????????????????????

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites



Hi all,

isn't it possible to add russian text like this in SciTE

потребность написать российский текст

I'm not russian .. but i tried .. and did only return ???????????????????????

Emiel

File/Enncoding/UTF-8 :whistle:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

isn't it possible to add russian text

I'm not russian ..

I'd like to start making Japanese Auto-It scripts without learning Japanese.

Share this post


Link to post
Share on other sites

No man .. it's for a multilangual GUI .. someone else is translating it for me

So if you can translate 120 lines of english for me in japanese .. please let me know ..

@JdeB thnx but how can i activate it ?

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

@Emiel Wieldraaijer - You may need to have a russian font file installed, else it wont read it correctly giving you the ???'s

Secure... Did you try what I posted and then copy/paste the posted Rusian characters ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@JdeB

Sorry .. hehehehe i found it Menu File - Encoding - UTF (Stupid me)

@Secure_ICT

No need to install the font because .. if i didn't install it .. i could not post the question ..


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

If you want to make a gui with support of many languages, try this (i use it for all my script that i share with my friends) :

$LangFile = @ScriptDir & "\Language_ru.lng"
$Message = Translation($LangFile)

GUICreate($Message[1], 300, 300)

GUICtrlCreateLabel($Message[2], 50, 50)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $msg
        Case -3
            Exit
    EndSwitch
WEnd


Func Translation($LangFile)
    $TotalTranslations = 10
    Global $Message[$TotalTranslations+1]
    
    $Message[1] = "This is my GUI title"
    $Message[2] = "This is the label text"
    $Message[3] = "some another text..."
    $Message[4] = "some another text... 1"
    $Message[5] = "some another text... 2"
    $Message[6] = "some another text... 3"
    $Message[7] = "some another text... 4"
    $Message[8] = "some another text... 5"
    $Message[9] = "some another text... 6"
    $Message[10] = "some another text... 7"
    
    If FileExists($LangFile) Then
        For $iLng = 1 To $TotalTranslations
            $ReadCurrentTransl = IniRead($LangFile, "Main Translation", "0"&$iLng, "")
            If $ReadCurrentTransl <> "" Then $Message[$iLng] = $ReadCurrentTransl
        Next
    EndIf
    Return $Message
EndFunc

The file Language_ru.lng must include somthing like this:

[Main Translation]
01="Это заголовок моего ГУИ"
02="Это текст надписи"
03="Другой текст..."
04="Другой текст... 1"
05="Другой текст... 2"
06="Другой текст... 3"
07="Другой текст... 4"
08="Другой текст... 5"
09="Другой текст... 6"
010="Другой текст... 7"

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

If you like to use a translation just in gui (without using the file), try this function (by amel27).

MsgBox(0, "Test Rus", _Utf8ToAnsi("Русский текст"))

Func _Utf8ToAnsi($utf8String)
    Return _Uni2Any(_Any2Uni($utf8String, 65001), 0)
EndFunc

Func _Any2Uni($anyString, $codePage)
    Local $bufSize = StringLen($anyString) * 2
    Local $buf = DllStructCreate("byte[" & $bufSize & "]")
    Local $ret = DllCall("Kernel32.dll", "int", "MultiByteToWideChar", _
        "int", $codePage, _
        "int", 0, _
        "str", $anyString, _
        "int", StringLen($anyString), _
        "ptr", DllStructGetPtr($buf), _
        "int", $bufSize)
    Local $uniString = StringLeft(DllStructGetData($buf, 1), $ret[0] * 2)
    $buf = 0
    Return $uniString
EndFunc

Func _Uni2Any($uniString, $codePage)
    Local $uniStringLen = StringLen($uniString)
    Local $bufLen = $uniStringLen * 2
    Local $in = DllStructCreate("byte[" & $bufLen & "]")
    Local $out= DllStructCreate("char[" & $bufLen & "]")
    DllStructSetData($in, 1, $uniString)
    Local $ret = DllCall("kernel32.dll", "int", "WideCharToMultiByte", _
        "int", $codePage, _
        "int", 0, _
        "ptr", DllStructGetPtr($in), _
        "int", $uniStringLen / 2, _
        "ptr", DllStructGetPtr($out), _
        "int", $bufLen, _
        "int", 0, _
        "int", 0)   
    Local $anyString = DllStructGetData($out, 1)
    $out= 0
    $in = 0
    Return $anyString
EndFunc

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

Thnx MsCreatoR ..

i will take a look at it .. looks .. nice .. but i use a diffent approach ..

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0