Title: Page Simple Text Localization
Last modified: February 23, 2022

---

# Page Simple Text Localization

 *  Resolved [karlostyno](https://wordpress.org/support/users/karlostyno/)
 * (@karlostyno)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/)
 * I would like to do standard text localization directly on page (without developing).
   For example: “Edit Page” is string which is localized in WordPress to all languages(*.
   po and *.mo files) by default. Is any block/paragraph/shortcode/settings in page
   editor, which force translation of the string to actual page locale?
 * I do know how localization works in background, I am probably able to develop
   own translation shortcode. But I feel there should be some default-Wordpress 
   way how to request translate() call directly from page.
 * Thanks for any advice.
    -  This topic was modified 4 years, 2 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15400814)
 * There are filter hooks that will let you alter strings in any manner you care
   to define. However, you can only use WP localization functions on predefined,
   known strings. They cannot translate any random string that you happen to pass
   to them.
 * There are a few different established approaches to handle translations.
 * > [Multilingual WordPress](https://wordpress.org/support/article/multilingual-wordpress/)
 *  Thread Starter [karlostyno](https://wordpress.org/support/users/karlostyno/)
 * (@karlostyno)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15402970)
 * Thank you for replay. I know I can call WP localization functions as plugin developer.
 * But I was more wondering if the localization can be requested directly from Post/
   Page Editor – accessible via standard Editor Role User (not developer). Something
   like shortcode: [translate “Edit Page”].
 * The first idea was to make a plugin doing only extension of predefined known 
   strings (*.po and *.mo files) and Editors can used them when editing Post/Page.
   I can still implement such shortcode into mentioned plugin.
 * Thank you also for the link. Good list of localization approaches in different
   plugins.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15407091)
 * Shortcode handler functions can call any PHP resource, so in theory yes, but 
   the strings passed to translate in the shortcode must be of limited scope since
   they have to be pre-defined. I’m unsure how practical this would be except in
   very specific situations. Authors could have difficulty providing precisely the
   correct phrase as a shortcode attribute.
 * I imagine a custom block that presents a dropdown of common phrases that all 
   exist in the .mo files. It could then dynamically translate the chosen phrase
   based on the current user’s locale.
 *  Thread Starter [karlostyno](https://wordpress.org/support/users/karlostyno/)
 * (@karlostyno)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15431672)
 * Thank you for clarify.
 * My idea was to use it in oposit way. At the first create pages in base languages(
   English) using some of discussed shortcode (for sentences or whole paragraphs).
   Then create own .mo files based on those pages, so build translation step-by-
   step with single page for all languages. Yes, there is question if this is useful
   approach.
 * My original question was if there is such tool in default WordPress. And it must
   be developed as plugin.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15434680)
 * Such functionality is technically feasible in a theme, but a plugin makes much
   more sense. Theme are meant to manage appearance, not functionality.
 * You could send page content out to a machine translation service so any arbitrary
   content could be displayed in the current locale’s language. Of course, such 
   translations do not always do a very good job of it, but the result is usually
   understandable.
 * The gettext translation scheme is intended for single phrases. It doesn’t do 
   as well with larger blocks of text that may contain HTML for paragraph breaks
   and other text styling. IMO you’re better off using one of the approaches outlined
   in the article I initially linked.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Page Simple Text Localization’ is closed to new replies.

## Tags

 * [Localization](https://wordpress.org/support/topic-tag/localization/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/page-simple-text-localization/#post-15434680)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
