Bug? BCToast have bug with Thai language.(English is complete)

Theera

Well-Known Member
Licensed User
Longtime User
After I change text to be Thai language. it show not complete correctly.

toast.Show($"ไฟล์เก่าชื่อ'${Result.RealName}'ถูกเรียกใช้งาน"$)
 

Attachments

  • pic.jpg
    pic.jpg
    8 KB · Views: 98

PaulMeuris

Active Member
Licensed User
Hello Theera,
When i use this code:
B4X:
    Dim result As String = "ทดสอบ1.htm"
    ToastMessageShow($"ไฟล์เก่าชื่อ'${result}'ถูกเรียกใช้งาน"$,True)
The result is this:
thai_toast_message.PNG

Is this the result you wanted?
Can you try to explain more?
Greetings,
Paul
 

Theera

Well-Known Member
Licensed User
Longtime User
Many thanks, PaulMeuris
That's my wanted. But BCToast isn't reponsed for Thai developers.
 

Theera

Well-Known Member
Licensed User
Longtime User
How do you produce Result.RealName? Are you using custom type?
Is it a Resultset?
Something like Result.GetString(“RealName”) ?
I'm sorry I don't understand your advise. (even using google translate, I still not be understand)However, it's my selffish for request. This thread is closed.
 

aeric

Expert
Licensed User
Longtime User
Can you post a small example next time?

B4X:
Sub Class_Globals
    Private Root As B4XView
    Private toast As BCToast
    Private Result As MyResult
    Type MyResult (RealName As String)
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    toast.Initialize(Root)
    Result.Initialize
    Result.RealName = "ทดสอบ1.htm"
End Sub

Private Sub Button1_Click
    toast.Show($"ไฟล์เก่าชื่อ'${Result.RealName}'ถูกเรียกใช้งาน"$)
End Sub
 

Theera

Well-Known Member
Licensed User
Longtime User
Please see my code at line 86-88 ,after you have run it and load the html file. The Toasts are different.
 

Attachments

  • HtmlCreator.zip
    14.5 KB · Views: 82

PaulMeuris

Active Member
Licensed User
After running your app and saving and loading the html text then this is the result:

thai_toast_message_2.PNG

The font size is different and the BCToast performs a word-wrap sooner if the text gets too long.
I tried with my device language setting to Thai but it gave me the same result.
So you can use the toast that you like the best.
 

Theera

Well-Known Member
Licensed User
Longtime User
Thank you for the kind of you testing it again ,PaulMeuris. I haven't been serious about it ,I just only tell about BCtoast library has some bug.
 
Top