Inputbox too narrow
-
It is the Sketchup API inputbox that I am referring to. Adding spaces and possibly a period at the end is really not a very good solution.
English - OK
French - OK
Russian - doesn't fit ( how many spaces )
Chinese - or some other language ( how many spaces )Would it be better if I converted this over to a web dialog.
-
Also make sure that your .rb script is saved as a UTF-8 without BOM encoded text file.
It's a simple option if you use Notepad++.exe to edit it...But padding the strings with spaces is often the only way to get everything into an inputbox drop-down/text-area or left-side-prompt.
Using webdialogs allows you greater flexibility in format and user interaction, but again if you specify fixed width areas for anything containing text, then it will crop [or wrap - depending on your css etc] your longer strings - especially as might happen in 'translated strings'...
So you will still need to test every dialog in every language to spot unexpected glitches... -
I've got Russian working.
Initially I ran into a problem where the last item in a list just showed up as a bunch of vertical lines. So I tried adding another pipe symbol at the end and it worked.
d_options = @@options_t.collect.join('|') + '|'
Will Chinese work the same way? Or will it not fit into UTF-8?
-
usefull
Thanks -
I have a number of languages translating just fine.
I open up my dictionary template in Notepad++ and save it in the appropriate language using UTF-8 without BOM.
With French, Russian, icelandic everything works well.
With Chinese I just see a bunch of boxes.How can I test - is there something special to make use of Chinese fonts? Do I have to install a Chinese version of Sketchup? Is there something else that I am missing.
-
your default font needs to be one with the extended char set that includes the Chinese dialect your writing in... [for you to see them]
Lucida Console is a reported to be pretty good [monospaced] all-rounder or Arial [Pro] is not to bad if you have it...
been looking into the same things myself...
john
-
@garry k said:
I've got Russian working.
Will Chinese work the same way? Or will it not fit into UTF-8?
UTF-8 is a variant of Unicode, and definitely supports Chinese. However, as @driven pointed out, the display font you are using must also handle the extended character codes used by Chinese.
Steve
-
looking at PC specific fonts it seems that Lucida Console may not include Chinese characters... so sorry about that advice...
OT [ish] On mac when using rich text you get some automatic font substitutions that build 'char sets' for missing bits.
On one occasion when trying to translate a Russian plugin it really did my head in when I tried to copy paste back into the webdialog's html...
john
-
I've now got it working.
Here are some examples using the inputbox for my Door Maker.My next job will be to get this to work inside web dialog.
I understand that I will need a metatag - I'm hoping for the best.People who actually use these languages will probably laugh at the straight translations. Since I don't understand the various contexts - I'm hoping for a bit of help.
But at least this is a start - and I know that the code works without having to make any changes.
-
I've now made a simple video of the door maker.
Advertisement