Language Handler Difficulties

Language Handler Difficulties

Postby medeek » Sun Nov 12, 2017 8:13 pm

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:


Code: Select all
# 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:

Code: Select all
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.
0
Nathaniel P. Wilkerson PE
Medeek Engineering Inc
design.medeek.com
User avatar
medeek 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 


 

Return to Developers' Forum

Who is online

Users browsing this forum: tollerhecht999 and 2 guests

Visit our sponsors: