Recent Topics

1 Mar 24, 2009 03:22    

I see in the original videoplug plugin that a string inside a javascript looks like this:

var p = '<?php echo TS_('Enter video ID from %s:') ?>';


Why is it a TS_ instead of T_ or NT_ ? I'm guessing and vaguely recalling that each one means a slightly different thing but I dunno what.

The thing is I'm rebuilding videoplug to be stronger smarter faster cheaper cooler neater better and want to make sure I'm doing my translatables correctly. So ... uh ... what's the deal here?

2 Mar 24, 2009 07:41

TS_():

/**
 * Translate and escape single quotes.
 *
 * This is to be used mainly for Javascript strings.
 *
 * @uses T_()
 * @param string String to translate
 * @param string Locale to use
 * @return string
 */

From inc/locales/_locale.funcs.php line 196 (on 2.4.6)

3 Mar 24, 2009 13:26

Well heck and be darned - I was pretty sure I read it somewhere ;) That way the escapes or whatever they're called get handled smartly - cool. Thanks!


Form is loading...