422 posts Keep Walking
  • Has been part of the Envato Community for over 3 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
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.

3567 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 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/

422 posts Keep Walking
  • Has been part of the Envato Community for over 3 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
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?

3567 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 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..

422 posts Keep Walking
  • Has been part of the Envato Community for over 3 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
UXbarn says

Alright, thanks again Ruben! :bigsmile:

by
by
by
by
by
by