2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 more
ThemeProvince
says

ive managed to get all admin texts to translate apart from custom post type labels. Any thoughts?

743 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Had an item that became a weekly top seller
  • Had an item featured on Envato Market
  • Won a Most Wanted contest
+5 more
Orbital_Themes
says

Your gettext declarations are a bit wrong. The ”__” returns the text string, “_e” echoes, and the “_x” let’s you mark the context in case there are two exactly same strings used in different contexts. When using any of the above you have to specify the domain like this:

__( 'Lorm ipsum', 'domain' )

Where ‘domain’ will be ‘brandspace’ in your case. Now you use “_x” like this:

_x( 'Lorem ipsum', 'context', 'domain' )

So if you have, for example, ‘Add New’ string which appears twice in your theme, but once it’s in the context of book, and the second time in the context of car, you would do something like this:

_x( 'Add New', 'book', 'brandspace' );
_x( 'Add New', 'car', 'brandspace' );

EDIT : So, in conclusion, you can’t get your labels to translate because you haven’t specified the domain, and you misuse the “_x”. :)

2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 more
ThemeProvince
says

Turns out PoEdit is doesn’t even support x. It did what you suggested and it still didn;t work so instead I ditched _x and used _ and everything is working now. Thanks anyway!

743 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Had an item that became a weekly top seller
  • Had an item featured on Envato Market
  • Won a Most Wanted contest
+5 more
Orbital_Themes
says

That’s right, I don’t know how to get _x working in poedit too. Try using the CodeStyling Localization plugin, it should do the job with _x.

2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 more
ThemeProvince
says
pogoking said
That’s right, I don’t know how to get _x working in poedit too. Try using the CodeStyling Localization plugin, it should do the job with _x.

its all working now. I dont really need to use _x as the translator won’t really mind anyway.

by
by
by
by
by
by