Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_c [ WordPress Function ]

_c ( $text, $domain = 'default' )
Parameters:
  • (string) $text Text to translate
  • (string) $domain Optional. Domain to retrieve the translated text
See:
Returns:
  • (string) Translated context string without pipe
Defined at:

Soorgelijke functies: _nc, _, _x, _e, __


Retrieve translated string with vertical bar context

Quite a few times, there will be collisions with similar translatable text found in more than two places but with different translated context.

In order to use the separate contexts, the _c() function is used and the translatable string uses a pipe ('|') which has the context the string is in.

When the translated string is returned, it is everything before the pipe, not including the pipe character. If there is no pipe in the translated text then everything is returned.

Source


<?php
function _c$text$domain 'default' ) {
    
_deprecated_function__FUNCTION__'2.9''_x()' );
    return 
before_last_bartranslate$text$domain ) );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics