Libintl-3.4.0 Solaris Download - Sunfreeware
Click Here >> https://ssurll.com/2tvHc9
How to Download and Install libintl-3.4.0 on Solaris
Libintl is a library that provides internationalization and localization support for programs that use the GNU gettext system. It is needed by some programs when libintl is not in /usr/lib on Solaris. In this article, we will show you how to download and install libintl-3.4.0 on Solaris using the sunfreeware.com website.
Step 1: Download libintl-3.4.0 from sunfreeware.com
Sunfreeware.com is a website that offers free software packages for Solaris SPARC and x86 platforms. You can find libintl-3.4.0 in the freeware list for Solaris 10 SPARC[^1^] or Solaris 10 x86[^3^]. The file name is libintl-3.4.0-sol10-sparc-local.gz or libintl-3.4.0-sol10-intel-local.gz depending on your architecture.
To download the file, you can use a web browser or a command-line tool like wget or curl. For example, to download libintl-3.4.0-sol10-sparc-local.gz using wget, you can use the following command:
wget http://www.sunfreeware.com/sparc/10/libintl-3.4.0-sol10-sparc-local.gz
The file size is about 1 MB and it will be saved in your current directory.
Step 2: Unzip and install libintl-3.4.0 on Solaris
After downloading the file, you need to unzip it and install it using the pkgadd command. You can do this in the following steps:
Copy the file to the /usr/sfw/bin directory on the Solaris host.
Enter the following command to unzip the file and start the installation:
gunzip libintl-3.4.0-sol10-sparc-local.gz
pkgadd -G -d libintl-3.4.0-sol10-sparc-local
When prompted for the packages to be processed, enter all or press Enter.
When installation is complete, you should see the following message:
Installation of was successful.
You can verify that libintl-3.4.0 is installed by checking its version with the following command:
/usr/local/bin/gettext --version
You should see something like this:
gettext (GNU gettext-runtime) 0.14
Written by Ulrich Drepper.
Copyright (C) 1995-2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Conclusion
In this article, we have shown you how to download and install libintl-3.4.0 on Solaris using the sunfreeware.com website. This library is useful for programs that use the GNU gettext system for internationalization and localization support.
If you have any questions or comments, please feel free to leave them below.
How to Use libintl-3.4.0 on Solaris
Now that you have installed libintl-3.4.0 on Solaris, you can use it to enable internationalization and localization support for your programs that use the GNU gettext system. Here are some examples of how to use libintl-3.4.0 on Solaris:
Example 1: Using gettext to translate messages
Gettext is a command-line tool that can be used to translate messages from one language to another using the GNU gettext system. You can use gettext to translate messages in your shell scripts or other programs that output text to the standard output or error streams.
To use gettext, you need to have a message catalog file that contains the translations for the messages in your program. A message catalog file is a binary file that is generated from a source file called a PO file (Portable Object). A PO file is a text file that contains the original messages and their translations in a specific format.
You can create a PO file manually or use a tool like xgettext to extract the messages from your source code. You can also use a tool like msgfmt to compile a PO file into a message catalog file. You can find more information about these tools and the PO file format in the GNU gettext manual.
Once you have a message catalog file, you need to place it in a directory that follows the convention of /usr/local/share/locale//LC_MESSAGES/.mo, where is the language code, and is the name of your program or package. For example, if you have a message catalog file for Spanish translations of your program foo, you can place it in /usr/local/share/locale/es/LC_MESSAGES/foo.mo.
Then, you can use gettext to translate messages in your program by passing the message and the domain as arguments. For example, if you have a shell script that prints \"Hello world\" in English, you can use gettext to print \"Hola mundo\" in Spanish by using the following command:
/usr/local/bin/gettext -d foo \"Hello world\"
If you want to change the language dynamically, you can set the environment variable LANG to the desired language code before calling gettext. For example, if you want to print \"Bonjour monde\" in French, you can use the following command:
LANG=fr /usr/local/bin/gettext -d foo \"Hello world\"
Example 2: Using libintl functions to translate messages
If you are writing a C or C++ program that uses the GNU gettext system, you can use the libintl functions to translate messages in your source code. The libintl functions are defined in the header file /usr/local/include/libintl.h and are linked with the library /usr/local/lib/libintl.so.
The most basic function is gettext(), which takes a message as an argument and returns its translation according to the current locale settings. For example, if you have a C program that prints \"Hello world\" in English, you can use gettext() to print \"Hola mundo\" in Spanish by using the following code:
int main(void) {
printf(\"%s\\n\", gettext(\"Hello world\"));
return 0;
}
To compile and run this program, you need to have a message catalog file for Spanish translations of your program in /usr/local/share/locale/es/LC_MESSAGES/messages.mo, and set the environment variable LANG to es before running it. For example, you can use the following commands:
gcc -o hello hello.c -I/usr/local/include -L/usr/local/lib -lintl
LANG=es ./hello
You can also use other libintl functions to specify the domain, the language, and the encoding of your messages. For example, you can use bindtextdomain() to set the directory where your message catalog files are located, textdomain() to set the name of your program or package, setlocale() to set the locale settings for your program, and bind_textdomain_codeset() to set the encoding of your messages. You can find more information about these functions and their usage in the GNU gettext manual.
Conclusion
In this article, we have shown you how to download and install libintl-3.4.0 on Solaris using the sunfreeware aa16f39245