HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Internationalization on a SPI
Operating System - HP-UX
1832251
Members
2713
Online
110041
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2004 03:54 AM
03-15-2004 03:54 AM
Internationalization on a SPI
Hello.
I make my first SPI and this on provides templates and applications in english.
It is possible to make a SPI which contains templates and applications in several language : choose on the swinstall the language english, spanich, french... ?
How can i make this ?
Thk u for your help !
Big thanks.
I make my first SPI and this on provides templates and applications in english.
It is possible to make a SPI which contains templates and applications in several language : choose on the swinstall the language english, spanich, french... ?
How can i make this ?
Thk u for your help !
Big thanks.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2004 05:19 AM
03-15-2004 05:19 AM
Re: Internationalization on a SPI
You can provide different messages in different languages through the use of message catalogs. You can build them using the "gencat" command, and you can then access them using the catopen() and catgets() functions. For example, create a message catalog, hello.msg:
set 1
1 Hola, mundo!
Then you would compile this into a .cat file, by running the command:
# gencat hello.cat hello.msg
Next, you would copy the hello.cat file into the appropriate directory (for example, /usr/lib/nls/es_ES.iso88591). Now here is your application:
#include
#include
int main() {
nl_catd catid;
char *msg;
catid = catopen( "hello.cat", 0 );
if ( catid < 0 ) {
perror( "Unable to open message catalog" );
}
printf( "%s\n", catgets( catid, 1, 1, "Hello, world!" );
}
Now all you need to do is compile that hello.c file (using your choice of C compiler). If you set LANG=C, then you should get "Hello, world!" as output. However, if you set LANG=es_ES.iso88591, you should get "Hola, mundo!" as output.
Share and enjoy.
set 1
1 Hola, mundo!
Then you would compile this into a .cat file, by running the command:
# gencat hello.cat hello.msg
Next, you would copy the hello.cat file into the appropriate directory (for example, /usr/lib/nls/es_ES.iso88591). Now here is your application:
#include
#include
int main() {
nl_catd catid;
char *msg;
catid = catopen( "hello.cat", 0 );
if ( catid < 0 ) {
perror( "Unable to open message catalog" );
}
printf( "%s\n", catgets( catid, 1, 1, "Hello, world!" );
}
Now all you need to do is compile that hello.c file (using your choice of C compiler). If you set LANG=C, then you should get "Hello, world!" as output. However, if you set LANG=es_ES.iso88591, you should get "Hola, mundo!" as output.
Share and enjoy.
I think, therefore I am... I think!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP