WordPress.org

Ready to get started?Download WordPress

Forums

Transposh WordPress Translation
Create "if lang is x, do this" (16 posts)

  1. Dreagnout
    Member
    Posted 1 year ago #

    Hello, i want to make this:

    http://wordpress.org/support/topic/transposh-switch-slider-with-lang?replies=6

    But i don't know how, i try the action of the post but i don't work for me, can you explain to me the exact code?

    Thanks.

    http://wordpress.org/extend/plugins/transposh-translation-filter-for-wordpress/

  2. Dreagnout
    Member
    Posted 1 year ago #

    How can i do this? I want to do for make a different url for each language. if lang is x show this x url of feed.

  3. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    I guess I will create such a function in 0.9.1

  4. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Ok,

    Added the following function :)
    transposh_echo

    works like
    transposh_echo("hello",array("es" => "hola", "fr" => "bonjour");

  5. Dreagnout
    Member
    Posted 1 year ago #

    I want to make this for change url in the feeds, no for change words.

    In where i need to put transposh_echo?

    Thanks.

  6. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    You don't need to put it anywhere, but yes, you will be able to use this function to achieve your result.

    assuming you previously had
    echo "rsslink";
    somewhere in your theme, you can replace it with
    transposh_echo ("rsslink", array("es" => "esrss",...));

    That's about it.

  7. Dreagnout
    Member
    Posted 1 year ago #

    I put this in the header.php of my theme:
    <?php
    transposh_get_current_language();
    transposh_echo ("http://www.cssblog.es/feed/", array("es" => "http://feeds.feedburner.com/CssBlogEs","en" => "http://feeds.feedburner.com/CSSBlogEN",));

    ?>

    And it shows this mistake:
    Fatal error: Call to undefined function transposh_echo() in /home/cssbloes/domains/cssblog.es/public_html/wp-content/themes/collective/header.php on line 30

  8. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    First, you don't need the transposh_get_current_language()
    Second, 0.9.1 is not out yet, I have just added this function to the plugin tonight :)

    You can get the latest code from trac.transposh.org, the function is in transposh.php

    But the way you did this seems correct :)

  9. Dreagnout
    Member
    Posted 1 year ago #

    Okay i'm going to wait to launch the 0.9.1 for update, i think that you will end the work soon.

    Thanks.

  10. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, I hope so too :)

  11. Dreagnout
    Member
    Posted 1 year ago #

    Finally y replace the new transposh and it work like a charm now!! Thanks!!

    I only need to fix the google xml sitemap to send the translated url, and it will totally happy with transposh plugin :)

  12. Dreagnout
    Member
    Posted 1 year ago #

    Ah, I forget to tell you this:

    In the RSS feed of my blog, for example, i have the site in spanish, and i subscribe to english rss feed. I see all the articles in my rss app in english (for example), but when i click the link to see in the browser, it shows the spanish (default) language!!

    You can make a try with this link:

    http://feeds.feedburner.com/CSSBlogEN

    How i can fix this?

    Thanks.

  13. Dreagnout
    Member
    Posted 1 year ago #

    Mmmm i see that the code tranposh_echo only works in a exactly place, but i want to globalize all the urls and change to other urls without changing each url one by one.

    Thanks.

  14. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Please explain this again...

  15. Kangarooo
    Member
    Posted 1 year ago #

    I think he means how to make self made language changing menu something like <a href="$transposh_lang_(en)/postid=115"> </a>for self made menu?
    At least i want to know that.

  16. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    First, open a topic

    Second, how about using transposh_get_current_language();

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.