WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Google AJAX Translation] Feature Request: Template tag for [Translate] link (9 posts)

  1. r-a-y
    Member
    Posted 4 years ago #

    Hi,

    This plugin is great!

    I have one request.

    Can we have a template tag where we can position the [Translate] button wherever we want in our theme?

    Thanks!

    http://wordpress.org/extend/plugins/google-ajax-translation/

  2. archon810
    Member
    Posted 4 years ago #

    I was just about do suggest the same thing. I've been thinking about a plugin like this for a while, knowing the new Google Translate API, and this is almost exactly what I was planning for it.

    A tag is essential here, I think. Additionally, it'd be great to be able to select the HTML for the button in the GUI - for ex, if I want to make it an image button.

  3. monodistortion
    Member
    Posted 4 years ago #

    Do you mean something like this that would put the button somewhere as defined by your theme?

    if ( function_exists( 'google_ajax_translate_button' ) ) {
        google_ajax_translate_button();
    }

    Do you know a plugin that uses this technique?

    It should be possible to make a function like this but it would have to be inside the WordPress loop I think. This is much more advanced since most users don't edit the php code in their theme much.

    Also it would be possible to add an option to use anything else for the [Translate] button like an image. Currently you can change the [ or ] characters easily but the word "Translate" shows up in different languages so it may be best to customize the look with CSS. What were you thinking of using?

  4. archon810
    Member
    Posted 4 years ago #

    mono, you're right - disregard the shortcode request. The shortcode tags are meant for the post content and this is not what's wanted here.

    But yeah - the position should be able to be manually specified by placing the function call in the right place. For example, Post Updated plugin uses this approach: http://guff.szub.net/2005/02/22/post-updated/

  5. monodistortion
    Member
    Posted 4 years ago #

    Ok, after thinking about it some more this shouldn't be too hard to add. It will take an extra option and one more function.

  6. gSaenz
    Member
    Posted 4 years ago #

    i second this motion, it would be very attractive to be able to position the "Translate" link by use of a shortcode.

  7. andreask
    Member
    Posted 4 years ago #

    Any news on this function?

  8. stacef
    Member
    Posted 4 years ago #

    Yes, any update on this function?

    Thanks

  9. monodistortion
    Member
    Posted 4 years ago #

    Sorry for the delay,

    This will be added in the next version (0.5.2) as a method you can use anywhere within the WordPress loop.

Topic Closed

This topic has been closed to new replies.

About this Topic