Hi,

    You can possibly take a look to Locale or i18n package.

http://search.cpan.org/modlist/Internationalization_Locale/Locale


Laurent.
  ----- Original Message ----- 
  From: Jez White 
  To: Win32-GUI 
  Sent: Tuesday, May 11, 2004 2:15 PM
  Subject: [perl-win32-gui-users] Internationalization and Win32::GUI


  Hi,

  Has anyone tried to create an application for Win32::GUI that supports 
various natural languages?

  I've worked on production applications that had to provide this kind of 
support in the past, so I've got a rough idea how the whole process should 
work. Adding the various windows API internationalization functions to the core 
is quite straight forward, but I'm struggling with how to handle text for all 
the windows and controls. Clearly, having several sets of creation routines for 
each natural language is not the correct approach:) As a rough design concept, 
how about using string tables and dynamic text replacement in runtime?

  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/stringtable_resource.asp

  Instead of hardcoding each -text item as the natural language, you use a code 
(in the example below, I've used ":" to signify a text look up should be used). 
On the control creation, the ID would be used (with a language offset) to 
retrieve the text for the current natural language, this text would then be 
used with the control. This would be handled automatically, and transparently 
from the Perl script. 

  Thoughts? Would anyone find this kind of functionality useful?

  Cheers,

  jez.

  =============

  use Win32::GUI;
  use strict;

  my $Win = new Win32::GUI::Window (
      -pos         => [100, 100],
      -size        => [330, 235],
      -name        => "Window",
      -text        => ":1",
      -onTerminate => sub {return -1;}
  );

  my $but=$Win->AddButton (
      -pos         => [20, 20],
      -size        => [100, 20],
      -name        => "OK",
      -text        => ":2",
      );
         
  $Win->Show();

  Win32::GUI::Dialog();

Reply via email to