initial import
src/i18n-hello-world.lisp
Sun Apr 5 17:36:46 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* initial import
--- old-qt.examples/src/i18n-hello-world.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.examples/src/i18n-hello-world.lisp 2014-10-30 07:39:47.000000000 +0100
@@ -0,0 +1,27 @@
+(in-package :qt.examples)
+
+(defun i18n-hello-world ()
+ "i18n hello world"
+ (qt:with-app
+ (qt:with-translator
+ ;; ensures that the message catalogs are found regardless
+ ;; of the current directory.
+ (concatenate 'string
+
+ (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src" "i18n-hello-world")))
+ "hello-world")
+ (let ((widget (make-instance 'qt:label)))
+ (setf (qt:property widget 'window-title)
+ (qt:tr "Lisp Qt Example" "hello-world"))
+ (cxx:set-text widget
+ (format nil (qt:tr "<h1>Hello world</h1>
+
+You are running ~A version ~A on a ~A ~A")
+ (lisp-implementation-type)
+ (lisp-implementation-version)
+ (software-type)
+ (software-version)))
+ (cxx:show widget)
+ (qt:exec widget)))))