Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Otput for different languages
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Reinhard Pagitsch  
View profile  
 More options Aug 12 2005, 4:33 am
Newsgroups: perl.xs
From: reinhard.pagit...@isis-papyrus.com (Reinhard Pagitsch)
Date: Fri, 12 Aug 2005 10:33:56 +0200
Local: Fri, Aug 12 2005 4:33 am
Subject: Otput for different languages
Hello,

I want to make my Win32 XS module ready for more than two languages. At
this time it supports german and english. To switch between these two
languages I use a function to get the language ID from the system and
then I use the correct string from a structure. But if I want to add
more languages (french, hungarian, taiwan, arabic, ... ) than I think to
use a structure would be a bad idea, isn't it?
What would be the best way to do this?

Creating include files with defines for each language? But how do I load
the correct one an runtime? Or have I to use language dll's which are
loaded at runtime? But how can I create and load this?

The structure I use:

static const struct
{
        char *friendlyname_eng; //english
        char *friendlyname_ger; /german
        unsigned int id;
        int docsummary; // 1 Document Summary 0 Summary Information

} SummaryInformation[] =

{
        { "Category", "Kategorie", PIDDSI_CATEGORY, 1 },
        ......

};

Thank you,
Reinhard

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff 'japhy' Pinyan  
View profile  
 More options Aug 12 2005, 9:56 am
Newsgroups: perl.xs
From: ja...@perlmonk.org (Jeff 'japhy' Pinyan)
Date: Fri, 12 Aug 2005 09:56:11 -0400 (EDT)
Local: Fri, Aug 12 2005 9:56 am
Subject: Re: Otput for different languages
On Aug 12, Reinhard Pagitsch said:

> I want to make my Win32 XS module ready for more than two languages. At this
> time it supports german and english. To switch between these two languages I
> use a function to get the language ID from the system and then I use the
> correct string from a structure. But if I want to add more languages (french,
> hungarian, taiwan, arabic, ... ) than I think to use a structure would be a
> bad idea, isn't it?
> What would be the best way to do this?

> Creating include files with defines for each language? But how do I load the
> correct one an runtime? Or have I to use language dll's which are loaded at
> runtime? But how can I create and load this?

Perhaps you could ask for the language of choice in the process of 'make',
and then s/#include LANGUAGE STUB/#include "$file.h"/ in your XS file?

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Reinhard Pagitsch  
View profile  
 More options Aug 12 2005, 10:06 am
Newsgroups: perl.xs
From: reinhard.pagit...@isis-papyrus.com (Reinhard Pagitsch)
Date: Fri, 12 Aug 2005 16:06:33 +0200
Local: Fri, Aug 12 2005 10:06 am
Subject: Re: Otput for different languages

Not a good idea, because the module can be build as a ppm package. And
than all users which are downloading this having the same language as
the system where the module was build, e.g. arabic :)

regards,
Reinhard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »