translate breadcrumb

Community Forums Forums Design Tips and Tricks translate breadcrumb

This topic is: resolved

This topic contains 1 reply, has 2 voices, and was last updated by  cehwitham 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36931

    pennywise
    Participant
    Post count: 6

    Hi Liste!

    Is there a possibility to translate the prefix of a breadcrumb of the respective site?
    For the other translation I use the “qtranslate plugin”.

    ``
    `add_filter( ``'genesis_breadcrumb_args'``, ``'child_breadcrumb_args'` `);`
    `/**`
    ` ``* Amend breadcrumb arguments.`
    ` ``* `
    ` ``* @author Gary Jones`
    ` ``*`
    ` ``* @param array $args Default breadcrumb arguments`
    ` ``* @return array Amended breadcrumb arguments`
    ` ``*/`
    `function` `child_breadcrumb_args( ``$args` `) {`
    `    ``$args``[``'home'``]                    = ``'Home'``;`
    `    ``$args``[``'sep'``]                     = ``' / '``;`
    `    ``$args``[``'list_sep'``]                = ``', '``; ``// Genesis 1.5 and later`
    `    ``$args``[``'prefix'``]                  = ``''``;`
    `    ``$args``[``'suffix'``]                  = ``''``;`
    `    ``$args``[``'heirarchial_attachments'``] = true; ``// Genesis 1.5 and later`
    `    ``$args``[``'heirarchial_categories'``]  = true; ``// Genesis 1.5 and later`
    `    ``$args``[``'display'``]                 = true;`
    `    ``$args``[``'labels'``][``'prefix'``]        = ``'You are here: '``;`
    `    ``$args``[``'labels'``][``'author'``]        = ``'Archives for '``;`
    `    ``$args``[``'labels'``][``'category'``]      = ``'Archives for '``; ``// Genesis 1.6 and later`
    `    ``$args``[``'labels'``][``'tag'``]           = ``'Archives for '``;`
    `    ``$args``[``'labels'``][``'date'``]          = ``'Archives for '``;`
    `    ``$args``[``'labels'``][``'search'``]        = ``'Search for '``;`
    `    ``$args``[``'labels'``][``'tax'``]           = ``'Archives for '``;`
    `    ``$args``[``'labels'``][``'post_type'``]     = ``'Archives for '``;`
    `    ``$args``[``'labels'``][``'404'``]           = ``'Not found: '``; ``// Genesis 1.5 and later`
    `    ``return` `$args``;`
    `}`
    </code>

    When I use this code I´m only able to change it into one other language....

    Thanks for your help.

    Best regards,
    Thorben

    • This topic was modified 1 year, 4 months ago by  pennywise.

    • This topic was modified 1 year, 4 months ago by  pennywise.
    http://www.hochdownloaden.de/
    #43686

    cehwitham
    Participant
    Post count: 396

    Hi Thorben,

    If you set your variables using:

    `__(‘Home’, ‘your_text_domain’)`

    Then you should be able to write a .po file to include your translations.

    Let me know how you get on.

    Chris


    Twitter: cehwitham Web: cehwitham.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.