Changeset 12257 for trunk/wp-includes/l10n.php
- Timestamp:
- 11/22/2009 12:07:41 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r12251 r12257 177 177 178 178 /** 179 * Retrieve translated string with vertical barcontext179 * Retrieve translated string with gettext context 180 180 * 181 181 * Quite a few times, there will be collisions with similar translatable text 182 182 * found in more than two places but with different translated context. 183 183 * 184 * In order to use the separate contexts, the _c() function is used and the 185 * translatable string uses a pipe ('|') which has the context the string is in. 186 * 187 * When the translated string is returned, it is everything before the pipe, not 188 * including the pipe character. If there is no pipe in the translated text then 189 * everything is returned. 190 * 191 * @since 2.2.0 192 * 193 * @param string $text Text to translate 184 * By including the context in the pot file translators can translate the two 185 * string differently 186 * 187 * @since 2.8 188 * 189 * @param string $text Text to translate 190 * @param string $context Context information for the translators 194 191 * @param string $domain Optional. Domain to retrieve the translated text 195 192 * @return string Translated context string without pipe 196 193 */ 197 function _c( $text, $domain = 'default' ) {198 return translate_with_context( $text, $domain );199 }200 194 201 195 function _x( $single, $context, $domain = 'default' ) {
Note: See TracChangeset
for help on using the changeset viewer.