403 posts Keep Walking
  • Has been a member for 3-4 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Exclusive Author
UXbarn says

Hi,

While I’m adding gettext functions to the theme, I’m a bit confused about do I need to wrap every string with gettext functions to make them translatable?

Firstly I thought I should make all of them translatable but since theme options and shortcode generator involve some specific instructions and perhaps, those wouldn’t relate to what buyers want to translate. So, I’m confused in this point.

For example; do I need to make theme options module and shortcode generator translatable? Or I just have to deal with CPT and any other elements that will be displayed in the front-end only?

Thanks in advance for your advice.

3445 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

You have to wrap absolutely all text strings into e(‘text’, ‘domain’); for echoing strings or __(‘text’, ‘domain’); for returning strings.

Before the e, there’s an _ .. but this editor doesn’t allow me to type it :D

More info here: http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/

403 posts Keep Walking
  • Has been a member for 3-4 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Exclusive Author
UXbarn says

Thank you Ruben. :)

Actually I’ve wrapped almost text strings with those functions but, just wondering that do I need to wrap the strings which are in some back-end areas like Theme Options and Shortcode Generator panel?

I was thinking about this question because I see that those back-end areas include the specific instructions of how to use them so I’m not sure whether buyers want to translate them for their sites or not.

I never have experience making the theme translation-ready before and that’s just my curiosity.

I shouldn’t think too much, just simply wrap them all or what do you suggest?

3445 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

Some buyers like to also translate the admin panel for clients, but others don’t.. But i’ve seen a lot of site translation the admin panel, so you should include that as well..

403 posts Keep Walking
  • Has been a member for 3-4 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Exclusive Author
UXbarn says

Alright, thanks again Ruben! :bigsmile:

by
by
by
by
by
by