Skip to main content
added 643 characters in body
Source Link
jdm2112
  • 3.7k
  • 1
  • 16
  • 23

WP has very good support for this. You will be Internationalizing and then Localizing your theme. Internationalization is often abbreviated as "i18n" because there are 18 letters between the 'i' and the 'n'.

The Codex provides a great reference on what needs to be done here: https://codex.wordpress.org/I18n_for_WordPress_Developers

Much of the work involves wrapping strings with various "__()" functions, providing a way for WP to find the appropriate localized version of a string for each language translation available.

EDIT: OK - based on your comment it looks like you are using a ready-made theme from another author. In the code you provided in your comment __( 'Stuur bericht', 'fluxus' ) shows the theme is built with i18n and localization in mind already. The double underscore function (very basically) takes the given phrase 'Stuur bericht' and looks for a translation under the text domain 'fluxus'.

Your theme very likely has a languages folder with translation files present (.po or .mo) for several languages. Or, the functions were put in the theme so you could easily add your own translation files to the theme without having to code PHP.

WP has very good support for this. You will be Internationalizing and then Localizing your theme. Internationalization is often abbreviated as "i18n" because there are 18 letters between the 'i' and the 'n'.

The Codex provides a great reference on what needs to be done here: https://codex.wordpress.org/I18n_for_WordPress_Developers

Much of the work involves wrapping strings with various "__()" functions, providing a way for WP to find the appropriate localized version of a string for each language translation available.

WP has very good support for this. You will be Internationalizing and then Localizing your theme. Internationalization is often abbreviated as "i18n" because there are 18 letters between the 'i' and the 'n'.

The Codex provides a great reference on what needs to be done here: https://codex.wordpress.org/I18n_for_WordPress_Developers

Much of the work involves wrapping strings with various "__()" functions, providing a way for WP to find the appropriate localized version of a string for each language translation available.

EDIT: OK - based on your comment it looks like you are using a ready-made theme from another author. In the code you provided in your comment __( 'Stuur bericht', 'fluxus' ) shows the theme is built with i18n and localization in mind already. The double underscore function (very basically) takes the given phrase 'Stuur bericht' and looks for a translation under the text domain 'fluxus'.

Your theme very likely has a languages folder with translation files present (.po or .mo) for several languages. Or, the functions were put in the theme so you could easily add your own translation files to the theme without having to code PHP.

Source Link
jdm2112
  • 3.7k
  • 1
  • 16
  • 23

WP has very good support for this. You will be Internationalizing and then Localizing your theme. Internationalization is often abbreviated as "i18n" because there are 18 letters between the 'i' and the 'n'.

The Codex provides a great reference on what needs to be done here: https://codex.wordpress.org/I18n_for_WordPress_Developers

Much of the work involves wrapping strings with various "__()" functions, providing a way for WP to find the appropriate localized version of a string for each language translation available.