# Translated text is not displayed, but saved

**URL:** <https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 13, 2020, 1:51pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520 "2020-06-13T13:51:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Perry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/perry/32/1336_2.png) [@Perry](https://forum.getkirby.com/u/Perry)\
**Post date:** [June 13, 2020, 1:51pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/1 "2020-06-13T13:51:37Z")

</div>

Hello,

I use 3 languages in panel: de, fr and it. if I enter and save a text in the default language and then switch to another language and translate and save it there. if I then switch to another language and return again, the text default is displayed. however, it is saved correctly in .txt.

I don’t understand what I’m doing wrong.

**blueprint**

```auto
    title: Page
    preset: page
    pages: false

    options:
      preview: false
      changeTemplate: false
      read:
        admin: true
        member: false

    fields:
      text:
        label: Text
        type: textarea

```

**config**

```auto
    <?php

    return [
        'debug' => true,
        'panel.install'=> true,
        'languages' => true,

      'community.markdown-field.buttons' => ['headlines', 'bold', 'italic', 'divider', 'link', 'email', 'pagelink', 'file', 'divider', 'ul', 'ol'],
      'community.markdown-field.font' => [
        'family' => 'sans-serif',
        'scaling' => false,
        'size' => 'regular',
      ],

      'community.markdown-field.modals' => true,
      'community.markdown-field.blank' => false,
      'community.markdown-field.invisibles' => false,

      'thumbs' => [
        'driver' => 'gd',
        'autoOrient' => true
      ],

     
        'routes' => [
          [
            'pattern' => 'mitglied/(:any)',
            'action' => function($user) {
              $site = kirby()->site(); 	
              return tpl::load(kirby()->roots()->templates() . DS . 'member.php', array('user' => $user, 'site' => $site), false);
            }
          ]
          ],
      
      

        'hooks' => [
          'route:before' => function ($route, $path, $method) {
         

            if (Str::startsWith($path, 'api/pages') && $method == 'GET') {

              $pagePath = str_replace('+', '/', str_replace('pages/', '', $route->arguments()[0]));

              $page = kirby()->page($pagePath);
              $user = kirby()->user();

            if ($page && $user && $page->created()->toUser()) {
              
              if($user->username() == "Admin")
              {
                return;
              }
              
              if ($user !== $page->created()->toUser()) 
              {
                  throw new Exception('You cannot access this page');
              }
             
            }
          
          }
        }
           
        
      ]
    ];

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2020, 2:33pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/2 "2020-06-13T14:33:40Z")

</div>

I cannot reproduce this behavior in a 3.3.6 Starterkit. Please test if this also happens in your environment with a fresh Starterkit.

Which Kirby version are you using?  
Which PHP version?  
Server? Caching? Plugins? etc…

---

<div class="post-metadata">

**Author:** ![anon77445132](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anon77445132](https://forum.getkirby.com/u/anon77445132)\
**Post date:** [June 13, 2020, 2:49pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/3 "2020-06-13T14:49:46Z")

</div>

Please check that ALL content text files have a language abbreviation in the filename,  
e.g. “`site.de.txt`” but no “`site.txt`” and “`default.de.txt`” but no “`default.txt`”.

This also applies to all file-related content text files,  
e.g. “`picture.jpg.de.txt`” but no “`picture.jpg.txt`”.

---

<div class="post-metadata">

**Author:** ![Perry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/perry/32/1336_2.png) [@Perry](https://forum.getkirby.com/u/Perry)\
**Post date:** [June 13, 2020, 3:12pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/4 "2020-06-13T15:12:19Z")

</div>

@HeinerEF the filenames are all correct

I tested it locally with:

> **[Local development environment](https://getkirby.com/docs/cookbook/setup/development-environment#laravel-valet)**
>
> Find the development environment that fits your needs.

I use these plugins:

```
├── auto-orient-images
│ ├── auto-orient-images.php
│ ├── changelog.md
│ ├── package.json
│ └── readme.md
├── heineref_twoPanelLinks
│ ├── index.css
│ ├── index.js
│ ├── index.min.css
│ └── index.php
├── kirby3-xmlsitemap
│ ├── assets
│ │ └── xmlsitemap.xsl
│ ├── CHANGELOG
│ ├── composer.json
│ ├── composer.lock
│ ├── index.php
│ ├── README.md
│ ├── src
│ │ ├── config.php
│ │ └── xmlsitemap.php
│ └── vendor
│ ├── autoload.php
│ └── composer
│ ├── autoload_classmap.php
│ ├── autoload_namespaces.php
│ ├── autoload_psr4.php
│ ├── autoload_real.php
│ ├── autoload_static.php
│ └── ClassLoader.php
└── markdown-field
    ├── composer.json
    ├── config.php
    ├── gulpfile.js
    ├── index.css
    ├── index.js
    ├── index.php
    ├── kirby-markdown-field-master
    │ ├── composer.json
    │ ├── index.css
    │ ├── index.js
    │ ├── index.php
    │ ├── lib
    │ │ ├── fields
    │ │ │ └── markdown.php
    │ │ └── languages
    │ │ ├── de.php
    │ │ ├── en.php
    │ │ └── fr.php
    │ ├── LICENSE
    │ ├── package.json
    │ ├── README.md
    │ └── src
    │ ├── addon
    │ │ └── show-invisibles.js
    │ ├── assets
    │ │ ├── css
    │ │ │ ├── abstracts
    │ │ │ │ └── _variables.scss
    │ │ │ ├── field
    │ │ │ │ └── _markdown-field.scss
    │ │ │ ├── styles.scss
    │ │ │ └── themes
    │ │ │ ├── _custom.scss
    │ │ │ ├── _default.scss
    │ │ │ └── _options.scss
    │ │ ├── icons
    │ │ │ ├── exports
    │ │ │ │ ├── attachment.svg
    │ │ │ │ ├── footnote.svg
    │ │ │ │ ├── h1.svg
    │ │ │ │ ├── h2.svg
    │ │ │ │ ├── h3.svg
    │ │ │ │ ├── h4.svg
    │ │ │ │ ├── h5.svg
    │ │ │ │ ├── h6.svg
    │ │ │ │ ├── horizontal-rule.svg
    │ │ │ │ ├── horizontal-rule-v2.svg
    │ │ │ │ ├── pagelink.svg
    │ │ │ │ └── strikethrough.svg
    │ │ │ ├── icons.ai
    │ │ │ └── icons.js
    │ │ └── images
    │ │ ├── emptyline.svg
    │ │ ├── newline.svg
    │ │ ├── tab.sketch
    │ │ └── tab.svg
    │ ├── components
    │ │ ├── field
    │ │ │ └── Markdown.vue
    │ │ ├── input
    │ │ │ └── MarkdownInput.vue
    │ │ └── toolbar
    │ │ ├── buttons
    │ │ │ ├── blockquote.vue
    │ │ │ ├── bold.vue
    │ │ │ ├── button.vue
    │ │ │ ├── code.vue
    │ │ │ ├── divider.vue
    │ │ │ ├── email.vue
    │ │ │ ├── file.vue
    │ │ │ ├── footnote.vue
    │ │ │ ├── headlines.vue
    │ │ │ ├── horizontal-rule.vue
    │ │ │ ├── image.vue
    │ │ │ ├── invisibles.vue
    │ │ │ ├── italic.vue
    │ │ │ ├── link.vue
    │ │ │ ├── ol.vue
    │ │ │ ├── pagelink.vue
    │ │ │ ├── strikethrough.vue
    │ │ │ └── ul.vue
    │ │ ├── dialogs
    │ │ │ ├── email-dialog.vue
    │ │ │ └── link-dialog.vue
    │ │ └── MarkdownToolbar.vue
    │ ├── index.js
    │ └── modes
    │ ├── kirbytext.js
    │ └── markdownextended.js
    ├── lib
    │ ├── fields
    │ │ └── markdown.php
    │ └── languages
    │ ├── de.php
    │ ├── en.php
    │ └── fr.php
    ├── LICENSE
    ├── package.json
    ├── package-lock.json
    ├── README.md
    ├── src
    │ ├── addon
    │ │ └── show-invisibles.js
    │ ├── assets
    │ │ ├── css
    │ │ │ ├── abstracts
    │ │ │ │ └── _variables.scss
    │ │ │ ├── field
    │ │ │ │ └── _markdown-field.scss
    │ │ │ ├── styles.scss
    │ │ │ └── themes
    │ │ │ ├── _custom.scss
    │ │ │ ├── _default.scss
    │ │ │ └── _options.scss
    │ │ ├── icons
    │ │ │ ├── exports
    │ │ │ │ ├── attachment.svg
    │ │ │ │ ├── h1.svg
    │ │ │ │ ├── h2.svg
    │ │ │ │ ├── h3.svg
    │ │ │ │ ├── h4.svg
    │ │ │ │ ├── h5.svg
    │ │ │ │ ├── h6.svg
    │ │ │ │ ├── horizontal-rule.svg
    │ │ │ │ ├── horizontal-rule-v2.svg
    │ │ │ │ ├── pagelink.svg
    │ │ │ │ └── strikethrough.svg
    │ │ │ ├── icons.ai
    │ │ │ └── icons.js
    │ │ └── images
    │ │ ├── emptyline.svg
    │ │ ├── newline.svg
    │ │ ├── tab.sketch
    │ │ └── tab.svg
    │ ├── components
    │ │ ├── field
    │ │ │ └── Markdown.vue
    │ │ ├── input
    │ │ │ └── MarkdownInput.vue
    │ │ └── toolbar
    │ │ ├── buttons
    │ │ │ ├── blockquote.vue
    │ │ │ ├── bold.vue
    │ │ │ ├── button.vue
    │ │ │ ├── code.vue
    │ │ │ ├── divider.vue
    │ │ │ ├── email.vue
    │ │ │ ├── file.vue
    │ │ │ ├── headlines.vue
    │ │ │ ├── horizontal-rule.vue
    │ │ │ ├── image.vue
    │ │ │ ├── invisibles.vue
    │ │ │ ├── italic.vue
    │ │ │ ├── link.vue
    │ │ │ ├── ol.vue
    │ │ │ ├── pagelink.vue
    │ │ │ ├── strikethrough.vue
    │ │ │ └── ul.vue
    │ │ ├── dialogs
    │ │ │ ├── email-dialog.vue
    │ │ │ └── link-dialog.vue
    │ │ └── MarkdownToolbar.vue
    │ ├── main.js
    │ └── modes
    │ ├── kirbytext.js
    │ └── markdownextended.js
    └── vendor
        ├── autoload.php
        └── composer
            ├── autoload_classmap.php
            ├── autoload_files.php
            ├── autoload_namespaces.php
            ├── autoload_psr4.php
            ├── autoload_real.php
            ├── autoload_static.php
            ├── ClassLoader.php
            ├── installed.json
            └── LICENSE

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2020, 3:17pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/5 "2020-06-13T15:17:03Z")

</div>

Unfortunately, you didn’t answer all my questions…

---

<div class="post-metadata">

**Author:** ![Perry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/perry/32/1336_2.png) [@Perry](https://forum.getkirby.com/u/Perry)\
**Post date:** [June 13, 2020, 3:36pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/6 "2020-06-13T15:36:26Z")

</div>

PHP 7.4.3  
Kirby 3.3.6  
How do I know if I’m using caching?

my kirby update script:

```auto
     #!/bin/sh
        sudo rm -rfv kirby
        git clone https://github.com/getkirby/kirby/
        cd "$(dirname "$0")/kirby"
        rm -rf .git exit;

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2020, 3:47pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/7 "2020-06-13T15:47:11Z")

</div>

Have you tested with a fresh Starterkit as I suggested above?

---

<div class="post-metadata">

**Author:** ![Perry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/perry/32/1336_2.png) [@Perry](https://forum.getkirby.com/u/Perry)\
**Post date:** [June 13, 2020, 4:12pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/8 "2020-06-13T16:12:19Z")

</div>

yes, it works.

look like this part in my config produce the error:

```auto
'hooks' => [
  'route:before' => function ($route, $path, $method) {
 

    if (Str::startsWith($path, 'api/pages') && $method == 'GET') {

      $pagePath = str_replace('+', '/', str_replace('pages/', '', $route->arguments()[0]));

      $page = kirby()->page($pagePath);
      $user = kirby()->user();

    if ($page && $user && $page->created()->toUser()) {
      
      if($user->username() == "Admin")
      {
        return;
      }
      
      if ($user !== $page->created()->toUser()) 
      {
          throw new Exception('You cannot access this page');
      }
     
    }
  
  }
}
   
  ]

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2020, 4:21pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/9 "2020-06-13T16:21:25Z")

</div>

This hook should not return anything.

You can modify it like this:

```auto
   'hooks' => [
        'route:before' => function ($route, $path, $method) {
       
      
          if (Str::startsWith($path, 'api/pages') && $method == 'GET') {
      
            $pagePath = str_replace('+', '/', str_replace('pages/', '', $route->arguments()[0]));
      
            $page = kirby()->page($pagePath);
            $user = kirby()->user();
      
            
            
            
            if ($page && $user && $user->role()->name() !== 'admin' && $user !== $page->created()->toUser()) 
            {
                throw new Exception('You cannot access this page');
            }
 
        
        }
      }
         
    ]

```

On a side note: Please always use three backticks on a separate line before and after a code block. Otherwise your code is hard to read when messed up. Thank you. I corrected your code above, so you can check out what it should look like by clicking on the edit button.

---

<div class="post-metadata">

**Author:** ![Perry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/perry/32/1336_2.png) [@Perry](https://forum.getkirby.com/u/Perry)\
**Post date:** [June 13, 2020, 4:29pm UTC](https://forum.getkirby.com/t/translated-text-is-not-displayed-but-saved/18520/10 "2020-06-13T16:29:03Z")

</div>

🥳 🙏

Thank you @texnixe
