Title: Plugin section editor with multilingual content
Last modified: August 6, 2024

---

# Plugin section editor with multilingual content

 *  [velingrad](https://wordpress.org/support/users/velingrad/)
 * (@velingrad)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-section-editor-with-multilingual-content/)
 * I’m working on allowing users to edit a section of my plugin output in the admin
   area ( so it loads the default template code and they can customize it ). Initially
   I stored the customized template in the db, but this makes it impossible to make
   some text section multilingual.
   There are some plugin functions that they can
   call in the template code like this {{my_plugin_function( $args )}} which is 
   replaced with the output from the function when the output is shown on the front-
   end, but I can’t think of a way to make that work with texts for different languages
   when the template customizations are stored in the db.Only thing I can think 
   of is to create a new folder in the wp-uploads folder and store the template 
   code there as .tmpl / .html or so, and [esc_html__( ‘my_text’, ‘my_domain’ )](https://developer.wordpress.org/reference/functions/esc_html__/)
   can be used. But this kind of feels wrong to me, isn’t the /wp-uploads folder
   only for image / file uploads? Or would it be acceptable for me to create a new
   folder there to store custom template sections?

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-section-editor-with-multilingual-content/#post-17939981)
 * You can store what files you like in /wp-content/{custom-folder}/ or /uploads/,
   but storing textual data in individual files is sub-optimal. You’re better off
   saving such data in the DB. Using custom tables like iconithemes suggests is 
   one approach, although you can organize a similar data organization within the
   existing WP schema. For example, the main templates can be saved custom post 
   types and translations can be saved as child posts under each main template “
   parent”. The advantage of using the WP schema is there are numerous built-in 
   functions we can use to save and access data. If you create custom tables, you’d
   need to create your own functions to do the same things that WP already does 
   for you. It’s totally feasible to do so, but it increases the development work
   needed to get to a solution.

Viewing 1 replies (of 1 total)

The topic ‘Plugin section editor with multilingual content’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-section-editor-with-multilingual-content/#post-17939981)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
