Jump to content

textdomain with sprintf ?


Doc
 Share

Recommended Posts

Hi guys,

I've just discovered (thanks to you) textdomain, which works fine.

Now I'd like to use that functionality with sprintf rather than

echo __("my string to translate", "my path")

Is it possible ?

Thanks

Link to comment
Share on other sites

Thanks @Martijn Geerts

It kinda works but I don't get the opportunity to translate the parameters actually.

I write in my translation file '/path/to/myfile.php ' I write :

__('Hello %1$s how do you %2$s?', '/path/to/'), 'Doc', 'do')

but through the admin, the only sentence I see waiting for translation is :

'Hello %1$s how do you %2$s?'

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...