Use char from PROGMEM

Hey guys, first of all, I want to apologize for all types of wrong grammar, I'm not a native speaker ...

So, here's my problem:
Currently I'm working on a script to print a text on an 20x4 LCD, which is stored in the Arduino Uno's Flash (PROGMEM).

First I used the F() - macro, but then I decided to insert a "language-file".
I better Show you the code:

#include <avr/pgmspace.h>
#include<LiquidCrystal.h>

void setup()
{
  // SOME CODE
  FUNCTION_STARTUP(false);
}
void Loop()
{
  // SOME CODE
}


// ANOTHER TAB
// Language
PROGMEM const prog_char PROGMEM_LCD_FAILED_SHUTDOWN_01[] = " System has not been";             
PROGMEM const prog_char PROGMEM_LCD_FAILED_SHUTDOWN_02[] = " shut down properly.";              
PROGMEM const prog_char PROGMEM_LCD_FAILED_SHUTDOWN_03[] = "Do not shut down the";              
PROGMEM const prog_char PROGMEM_LCD_FAILED_SHUTDOWN_04[] = "system while working";              
// and so on ....


// ANTOTHER TAB
// Startup
void FUNKTION_STARTUP(boolean VIA_STATUS)
{
  if (VIA_STATUS)
  {
    // SOME CODE
  }
  else
    FUNKTION_WRITE(1, PROGMEM_LCD_FAILED_SHUTDOWN_01,
                   1, PROGMEM_LCD_FAILED_SHUTDOWN_02,
                   1, PROGMEM_LCD_FAILED_SHUTDOWN_03,
                   1, PROGMEM_LCD_FAILED_SHUTDOWN_04);
}


// ANOTHER TAB
// Write on LCD
void FUNKTION_WRITE(boolean USE_LINE_0, const char LINE_0[21],  boolean USE_LINE_1, const char LINE_1[21], boolean USE_LINE_2, const char LINE_2[21], boolean USE_LINE_3, const char LINE_3[21])
{
  if (USE_LINE_0)                                                                           
  {                                                                                        
    lcd.setCursor(0, 0); lcd.print(LINE_0);                                               
  }                                                                                         
  if (USE_LINE_1)                                                               
  {                                                                                        
    lcd.setCursor(0, 1); lcd.print(LINE_1);                                                 
  }                                                                                    
  if (USE_LINE_2)                                                                           
  {                                                                                        
    lcd.setCursor(0, 2); lcd.print(LINE_2);                                            
  }                                                                                         
  if (USE_LINE_3)                                         
  {                                                                                   
    lcd.setCursor(0, 3); lcd.print(LINE_3);
  } 
}

So, that's what I got so far.
When the message should finally be printed on the LCD, there are only weird charakters.

I have really no clue, what's wrong with my script so far, would be really great, if someone could help me!

Short note:
The Hardware is really ok, because I ran the code without language from PROGMEM (just the text in the FUNKION_WRITE), and it worked fine.

Your strings are stored in program memory so the array variables represent pointers to progmem. However, you are using them as though they were pointers to SRAM i.e. normal data memory. You need to read the strings out of progmem and into SRAM in order to use them.

PS your English is very good.

First of all: Thank you very much for your help!

I've tried now to use your description to re-write the code, so I can use my FUNKTION_WRITE.

FUNKTION_WRITE(1, PROGMEM_LCD_FAILED_SHUTDOWN_01,
               1, PROGMEM_LCD_FAILED_SHUTDOWN_02,
               1, PROGMEM_LCD_FAILED_SHUTDOWN_03,
               1, PROGMEM_LCD_FAILED_SHUTDOWN_04);

But I have no idea what to do, is there a way to Import the array variables from the PROGMEM directly into my FUNKTION_WRITE? If yes, would you kindly tell me (or someone else, who knows the answer ^^)

deloarts:
is there a way to Import the array variables from the PROGMEM directly into my FUNKTION_WRITE? If yes, would you kindly tell me (or someone else, who knows the answer ^^)

Have you noticed that the function to read an analog pin is not ANALOGREAD()? That the function to read from PROGMEM is not PGM_READ_BYTE_NEAR?

Have you ever wondered why?

All capital letters are, by convention, reserved for constants. Functions are not constants!

First I want to thank everybody who tried to help me!

But luckily I found a working solution for my problem!
If anybody is currious how I did it, here is the snippet:

#include <avr/pgmspace.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); 

PROGMEM const char PROGMEM_TEST_1[] = " TEST LINE 1 01 ";
PROGMEM const char PROGMEM_TEST_2[] = " TEST LINE 1 02 ";
PROGMEM const char PROGMEM_TEST_3[] = " TEST LINE 2 01 ";
PROGMEM const char PROGMEM_TEST_4[] = " TEST LINE 2 02 ";


void setup()
{
  lcd.begin(16, 2);
}

void loop()
{
  FUNKTION_WRITE(PROGMEM_TEST_1, PROGMEM_TEST_3);
  delay(1000);
  FUNKTION_WRITE(PROGMEM_TEST_2, PROGMEM_TEST_4);
  delay(1000);
}

void FUNKTION_WRITE(const prog_char PARAMETER_1[], const prog_char PARAMETER_2[])
{
  
  char C1;
  char C2;
  
  lcd.setCursor(0,0);
  
  if (!PARAMETER_1) return;
  while((C1 = pgm_read_byte(PARAMETER_1++)))
    lcd.print(C1);
  
  lcd.setCursor(0,1);
  
  if (!PARAMETER_2) return;
  while((C2 = pgm_read_byte(PARAMETER_2++)))
    lcd.print(C2);
  
}

I have not set any comments in this short example, but if anybody has questions, just ask!

Your last function there ( in your first post ), and the function call that invokes it, seem to be pointlessly repetitious.

You mean the FUNKTION_WRITE?

Why does it seem repetitious? Is there a better way to do it?