Warning: include(../../header.php.zh_Hant.zh_Hant): Failed to open stream: No such file or directory in /var/www/html/man/man3/Locale::Po4a::Common.3pm.php.zh_Hant on line 4

Warning: include(): Failed opening '../../header.php.zh_Hant.zh_Hant' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/man/man3/Locale::Po4a::Common.3pm.php.zh_Hant on line 4

LOCALE::PO4A::COMMON.3PM

Section: User Contributed Perl Documentation (1)
Updated: 2025-05-04
Index Return to Main Contents
 

名稱

Locale::Po4a::Common - po4a 指令碼和實用程式的通用部分  

描述

Locale::Po4a::Common 包含 po4a 指令碼的公共部分和其他模組使用的一些有用函式。

如果需要,您可以禁用 Text::WrapI18N,如下所示:

    use Locale::Po4a::Common qw(nowrapi18n);
    use Locale::Po4a::Text;

而不是:

    use Locale::Po4a::Text;

這裡的順序很重要:因為大多數 Locale::Po4a 模組都會自行載入 Locale::Po4a::Common,所以第一次載入此模組將確定是否使用 Text::WrapI18N。  

功能

 

顯示輸出訊息

show_version($)

顯示指令碼的當前版本,以及一條簡短的版權訊息。它將指令碼的名稱作為引數。

wrap_msg($@)

此函式顯示訊息的方式與 sprintf() 相同,但會將結果封裝起來,以便它們在終端上看起來很美觀。

wrap_mod($$@)

此函式的工作方式類似於 wrap_msg(),但它將模組名作為第一個引數,並在訊息左側留下一個空格。

wrap_ref_mod($$$@)

此函式的工作方式類似於 wrap_msg(),但是它將 file:line 引用作為第一個引數,將模組名作為第二個引數,並在訊息的左側留下一個空格。

 

其他模組的封裝器

Locale::Gettext

當無法載入 Locale::Gettext 模組時,該模組提供以下函式的偽 (空) 實現。在這種情況下,po4a 訊息不會被翻譯,但程式將繼續工作。

如果存在 Locale::gettext,則此封裝器還呼叫 setlocale(LC_MESSAGES, ""),因此呼叫者也不依賴於 POSIX 模組。

bindtextdomain($$)
textdomain($)
gettext($)
dgettext($$)
 

作者

 Jordi Vilalta <jvprat@gmail.com>

 

版權和許可

版權所有 © 2005 SPI, Inc.

This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).


 

Index

名稱
描述
功能
顯示輸出訊息
其他模組的封裝器
作者
版權和許可

This document was created by using the manual pages.
Time: 17:05:10 GMT, May 04, 2025

Warning: include(footer_Locale::Po4a::Common.3pm.php): Failed to open stream: No such file or directory in /var/www/html/man/man3/Locale::Po4a::Common.3pm.php.zh_Hant on line 178

Warning: include(): Failed opening 'footer_Locale::Po4a::Common.3pm.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/man/man3/Locale::Po4a::Common.3pm.php.zh_Hant on line 178