diff --git a/Scripts/scriptcontext.py b/Scripts/scriptcontext.py index 3352e3df..8aff502e 100644 --- a/Scripts/scriptcontext.py +++ b/Scripts/scriptcontext.py @@ -34,3 +34,12 @@ def errorhandler(): replace the scriptcontext.errorhandler value ''' return None + + +__executing_command = None +def localize(s, context_id=None): + if context_id is None or __executing_command is None: + return s + import Rhino + assembly = __executing_command.PlugIn.Assembly + return Rhino.UI.Localization.LocalizeString(s, assembly, context_id) \ No newline at end of file