• Resolved Aldo

    (@ab_lu)


    Hello

    We have many strings who are fetched dynamically (i.e. ACF).
    Using a filter we can grab this strings before they are rendered and then using __() we return the according strings.

    Now, as this strings are rendered dynamically Loco Translate cannot grab them, so we have to add them manually in the POT template.

    The problem is, that each time we run a Sync, this strings are removed as obsolete.

    Is there any way we can keep them – even not being present in the scanned files?

    Thanks,
    Aldo

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tim W

    (@timwhitlock)

    No. the only way to preserve them is to define them in a PHP file. This can just be a dummy file that never gets used. It will allow you to add notes as a /* Translators .. */ commend too, so is a better method anyway.

    Thread Starter Aldo

    (@ab_lu)

    Thank for the feedback.

    I ended up writing a script who writes this strings into a PHP file, then it happens automatically.

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

The topic ‘Preserver manually added string into template’ is closed to new replies.