I am trying to understand things needed to make theme translation ready.Things below are not clear for me

  1. Which content of theme are to made transnational? Are title,customposttype and content are be included?
  2. Do i have to include the pot file or localizing the field is enough to make the theme transnational ready?

Do i have make the content() also translation ready in theme?

Short answer - No.

1). Content held in the database is generally not translated via static files. That includes post content and other user-defined data like taxonomies. As a theme developer, you only need prepare static text for translation. This should include any visible text that's hard-coded into your code. This is well documented.

There are plugins that allow "content" to be split into multiple languages, but these operate outside of WordPress's theme internationalization functions and don't require you to do anything special to your theme code.

2). You don't have to ship a POT file as long as one can be reliably extracted from your theme code. The official WordPress themes no longer ship with POT files. If you do ship a POT file you will find that the WordPress community translation system (GlotPress) actually ignores it anyway, so just make sure your localised code is 100%.

However, if you want to make it easier for people to translate your theme outside of this community, then I recommend shipping a POT file as a courtesy. It does no harm as long as it's always up to date with the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.