M
M
mipfikus2020-04-28 20:06:14
Internationalization and localization
mipfikus, 2020-04-28 20:06:14

How to write a Description on a multilingual site?

Site on wordpress, multilingual made using qTranslateX. Question: how to write your meta description of the page in each of the languages? Segmenti.lv website.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lord_Dantes, 2020-04-28
@mipfikus

So there is a code to insert certain pieces based on the language.

<?php if (qtrans_getLanguage() == 'lang'): ?>
    <?php echo "Text!"; ?>
<?php elseif (qtrans_getLanguage() == 'lang'): ?>
    <?php echo "Text"; ?>
<?php elseif (qtrans_getLanguage() == 'lang'): ?>
    <?php echo "Text"; ?>
<?php else : ?>
    <?php  echo "Text"; ?>
<?php endif; ?>

Instead of <? echo ?> just insert a piece of the desired code and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question