Skip to main content
added 70 characters in body
Source Link
Bld
  • 1
  • 1
  • 3

I noticed that previous default themes used to have /languages/ folder which is now gone.

  1. Is it now a good practice to not include the /languages/ folder when creating a custom theme? How do theme users translate it without this folder?
  2. Where should MO files be uploaded to not have them overwritten when a theme is updated? If they are located in /wp-content/themes/theme-name/languages/ then after each theme update they'll be overwritten. Should they now be uploaded somewhere else?
  3. The default language is en_US. When I create en_US.mo file and use https://codex.wordpress.org/Function_Reference/load_theme_textdomain the strings areShould plugins not updated. But if I change the name of the MO file to e.g. en_GB.mo and update Settings > Site Language to "English (UK)"create the strings are replaced. How can I keep en_US and update the strings/languages/ folder as well anymore?

I noticed that previous default themes used to have /languages/ folder which is now gone.

  1. Is it now a good practice to not include the /languages/ folder when creating a custom theme? How do theme users translate it without this folder?
  2. Where should MO files be uploaded to not have them overwritten when a theme is updated? If they are located in /wp-content/themes/theme-name/languages/ then after each theme update they'll be overwritten. Should they now be uploaded somewhere else?
  3. The default language is en_US. When I create en_US.mo file and use https://codex.wordpress.org/Function_Reference/load_theme_textdomain the strings are not updated. But if I change the name of the MO file to e.g. en_GB.mo and update Settings > Site Language to "English (UK)" the strings are replaced. How can I keep en_US and update the strings?

I noticed that previous default themes used to have /languages/ folder which is now gone.

  1. Is it now a good practice to not include the /languages/ folder when creating a custom theme? How do theme users translate it without this folder?
  2. Where should MO files be uploaded to not have them overwritten when a theme is updated? If they are located in /wp-content/themes/theme-name/languages/ then after each theme update they'll be overwritten. Should they now be uploaded somewhere else?
  3. Should plugins not create the /languages/ folder as well anymore?
Source Link
Bld
  • 1
  • 1
  • 3

/languages/ folder missing in default themes

I noticed that previous default themes used to have /languages/ folder which is now gone.

  1. Is it now a good practice to not include the /languages/ folder when creating a custom theme? How do theme users translate it without this folder?
  2. Where should MO files be uploaded to not have them overwritten when a theme is updated? If they are located in /wp-content/themes/theme-name/languages/ then after each theme update they'll be overwritten. Should they now be uploaded somewhere else?
  3. The default language is en_US. When I create en_US.mo file and use https://codex.wordpress.org/Function_Reference/load_theme_textdomain the strings are not updated. But if I change the name of the MO file to e.g. en_GB.mo and update Settings > Site Language to "English (UK)" the strings are replaced. How can I keep en_US and update the strings?