• Resolved patado

    (@patado)


    First of all, sorry for my english.
    I have last version WordPress with 3 languages (english, russian and ukrainian), web 2.0 directory plugin and installed qtranslate.
    In web 2.0 directory plugin i have create dinamic fields for listings (Working time, Address etc). In the title of these fields i typed <!–:ru–>Время работы<!–:–><!–:ua–>Час роботи<!–:–><!–:en–>Working time<!–:–> (also tryed [:ru]Время работы[:ua]Час роботи[:en]Working time[:]). When i open the lintings page – everything is great (on all languages), but when open a single listing page – in every title on these fields is “Время работыЧас роботиWorking time”.
    Why in listings page – everything is OK, but in single listing page is like “Время работыЧас роботиWorking time”?
    P.S. PHP code for both pages is the same.

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Clause

    (@johnclause)

    A link to plugin would always help. I do not find “web 2.0 directory plugin” in WP.

    In any case, it means that it needs integration. We would not be able to help without seeing the code.

    Thank you very much.

    Thread Starter patado

    (@patado)

    <?php if ($content_field->value): ?>
    <div class=”w2dc-field w2dc-field-output-block w2dc-field-output-block-<?php echo $content_field->type; ?> w2dc-field-output-block-<?php echo $content_field->id; ?>”>
    <?php if ($content_field->icon_image || !$content_field->is_hide_name): ?>
    <span class=”w2dc-field-caption”>
    <?php if ($content_field->icon_image): ?>
    <span class=”w2dc-field-icon w2dc-fa w2dc-fa-lg <?php echo $content_field->icon_image; ?>”></span>
    <?php endif; ?>
    <?php if (!$content_field->is_hide_name): ?>
    <span class=”w2dc-field-name”><?php echo $content_field->name?>:</span>
    <?php endif; ?>
    </span>
    <?php endif; ?>
    <span class=”w2dc-field-content”>
    <?php echo $content_field->value; ?>
    </span>
    </div>
    <?php endif; ?>

    This code is used by both pages.
    https://youjin.ua/gde-kupit/
    https://youjin.ua/gde-kupit/ashan-raduzhnyj/
    Here is a two link of this pages.

    Plugin Author John Clause

    (@johnclause)

    There is no way those two pages use the same code. I do not think that piece of code is applicable. You may consider hiring a developer to figure it out. It is very inefficient to do it here through showing little piece of random code. Find a developer who would be able to determine a relevant piece of code, then that developer will be able to apply integration too. If you wish you may submit a request for a paid job to us.

    Thank you.

    Thread Starter patado

    (@patado)

    I mean that that part of code is used in both pages for text string type field (working hours field).
    And here is the code that used for all fields:

    <div class=”w2dc-fields-group”>
    <?php if (!$content_fields_group->on_tab): ?>
    <div class=”w2dc-fields-group-caption”><?php echo $content_fields_group->name; ?></div>
    <?php endif; ?>
    <?php if (!$content_fields_group->hide_anonymous || is_user_logged_in()): ?>
    <?php foreach ($content_fields_group->content_fields_array AS $content_field): ?>
    <?php $content_field->renderOutput($listing); ?>
    <?php endforeach; ?>
    <?php elseif ($content_fields_group->hide_anonymous && !is_user_logged_in()): ?>
    <?php printf(__(‘You must be logged in to see this info’, ‘W2DC’), wp_login_url(get_permalink($listing->post->ID))); ?>
    <?php endif; ?>
    </div>

    Thread Starter patado

    (@patado)

    Is there is the any way to fix it?

    Plugin Author John Clause

    (@johnclause)

    Yes, definitely, there is a way, qtx can be integrated with anything, and I already gave you all the instructions I could.

    Thread Starter patado

    (@patado)

    One more detail: when the language was not set for listing – there was OK, but when i set the language – i have this <!–:ru–>Время работы<!–:–><!–:ua–>Час роботи<!–:–><!–:en–>Working time<!–:–> problem.

    Plugin Author John Clause

    (@johnclause)

    @patado, I am sorry, I cannot make sense of this sentence. I already gave you all the relevant links and there are links on those linked pages, reading of that will bring you to the solution. I do not think anyone would be able to help you further without seeing the code. Hiring a knowledgeable enough developer would be my way to go in your shoes.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Translate dynamic fields’ is closed to new replies.