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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement