Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Language Handler Difficulties
-
I'm trying to get the language handler to work but for the life of me I can't get it to translate.
My code that loads it up is here:
# First we pull in the standard API hooks. require 'sketchup.rb' require 'extensions.rb' # require 'langhandler.rb' # Define Module Hierarchy module Medeek_Engineering_Inc_Extensions module MedeekTrussPlugin # require 'langhandler.rb' # LH = LanguageHandler.new("medeek_truss.strings") ############################## # # Class Methods of Plugin # ############################## class MedeekMethods class << self include Math require 'langhandler.rb' LH = LanguageHandler.new("medeek_truss.strings")Then I call it up in my first prompt:
prompts1 = [LH["Truss Type; "], "Out-to-out Span (ft.); ", "Top chord Pitch (x/12); ", "Overhang Left (in.); ", "Overhang Right (in.); ", "TC Size (in.); ", "BC Size (in.); ", "Web Size (in.); ", "Ply Thickness (in.); ", "Raised Heel; ", "Heel Height (in.); "] defaults1 = ["#{@Trusstype}", "#{@TrussSpan_ft.round(5)}", "#{@Pitch}", "#{@Overhangl}", "#{@Overhangr}", "#{@Tcd}", "#{@Bcd}", "#{@Webd}", "#{@Ply}", "#{@Raisedheel}", "#{@Usrhh}"] list1 = ["King Post|Queen Post|Fink|Howe|Fan|Mod Queen|Double Fink|Double Howe|Mod Fan|Triple Fink|Triple Howe|Quad Fink", "", "2.5|3.0|3.5|4.0|4.5|5.0|5.5|6.0|6.5|7.0|7.5|8.0|8.5|9.0|9.5|10.0|10.5|11.0|11.5|12.0|12.5|13.0|13.5|14.0|14.5|15.0|15.5|16.0", "", "", "3.5|5.5|7.25|9.25|9.5|11.25|11.875|14.0|16.0", "3.5|5.5|7.25|9.25|9.5|11.25|11.875|14.0|16.0", "3.5|5.5|7.25|9.25|11.25", "", "NO|YES", ""]In my medeek_truss.strings file I have this line:
"Truss Type: "="Type de Treillis: ";I've put this file into the Resources/en-US subfolder.
All that displays is the original phrase "Truss Type: ".
What am I missing? I've mucked around with this for over an hour now and nothing.
Advertisement