Sponsored Content
Full Discussion: fprintf
Top Forums Programming fprintf Post 302252022 by otheus on Tuesday 28th of October 2008 03:43:43 PM
Old 10-28-2008
That's a shortcut for the "gettext()" call. This call is used in UNIX internationalization, to allow messages to be translated into another locale other than the one it was written in. Essentially, some ".po" files contain maps from the native-language string into another translation, such as German. Then, if a user has selected german as her locale, for instance, LANG=de-de, then gettext call returns the German version of the string.

GNU has a nice page about explaining it: http://www.gnu.org/software/gettext/
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to write to file using fprintf in find command...

:D I once again am looking through the man pages and am still working on the find command to fully comprehend all its attributes.. i am a little stuck on a problem with how many options to -print there are and the only two I know how to use are printf and -print.. i can not make heads or tails of... (2 Replies)
Discussion started by: moxxx68
2 Replies

2. Shell Programming and Scripting

Detect sprintf and fprintf bad use

Hello again, I don't know about regexp so I throw this question here: How can I detect files where, for example: sprintf (var1, "hello %s %s", sub1); The problem here is that we have 2 %s and only a variable. Or... the inverse: sprintf (var1, "hello %s %s", sub1, sub2, sub3,...subn); ... (2 Replies)
Discussion started by: albertogarcia
2 Replies

3. Programming

fprintf() gives segmentation fault

Hi, I am using fprintf to write few strings toa file which has been opened in write mode. The syntax is as follows: printf("Testing 7A.\n"); fprintf(out_screen,"%s|%s|%s|%s|%s|\n",var1,var2,var3,var4,var5); printf("Testing 8.\n"); When I execute the code It prints "Testing 7A." then... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

4. Shell Programming and Scripting

Fprintf issue

i had to send a mail an attachment which i got from find command. But i did not get mail but could see the following line in the logs "aliased to fprintf.c". Can someone help me to understand what does it mean?..As this issue is not occuring now, i could not replicate the problem now.Thanks. (1 Reply)
Discussion started by: jesu
1 Replies
GETTEXT(3)								 1								GETTEXT(3)

gettext - Lookup a message in the current domain

SYNOPSIS
string gettext (string $message) DESCRIPTION
Looks up a message in the current domain. PARAMETERS
o $message - The message being translated. RETURN VALUES
Returns a translated string if one is found in the translation table, or the submitted message if not found. EXAMPLES
Example #1 gettext(3)-check <?php // Set language to German putenv('LC_ALL=de_DE'); setlocale(LC_ALL, 'de_DE'); // Specify location of translation tables bindtextdomain("myPHPApp", "./locale"); // Choose domain textdomain("myPHPApp"); // Translation is looking for in ./locale/de_DE/LC_MESSAGES/myPHPApp.mo now // Print a test message echo gettext("Welcome to My PHP Application"); // Or use the alias _() for gettext() echo _("Have a nice day"); ?> NOTES
Note You may use the underscore character '_' as an alias to this function. Note Setting a language isn't enough for some systems and the putenv(3) should be used to define the current locale. SEE ALSO
setlocale(3). PHP Documentation Group GETTEXT(3)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy