Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • jooservices Friend
    #205479

    In Teline at right-top we have header calendar. It’s nice but somehow it’s missed translate able because hard code here.
    In this topic we’ll find out how to solve it.

    At first with browser debugger we can inspect this html and use it to search string and locate layout file

    <div class="col-inner">
    <span class="number date">13</span>
    <div class="text">
    <span class="day">Mon</span>, <span class="month">Apr</span>
    </div>
    </div>

    It’s located in:templatesja_teline_vtplsblocksheader.php.

    <div class="col calendar">
    <div class="col-inner">
    <span class="number date"><?php echo date('d') ?></span>
    <div class="text">
    <span class="day"><?php echo date('D') ?></span>, <span class="month"><?php echo date('M') ?></span>
    </div>
    </div>
    </div>

    It should be use Joomla! API to get date here. But somehow developer lost it. Now we need to solve it.
    What’s date return ?

    http://php.net/manual/en/function.date.php

    date(‘d’) will return
    <blockquote>d Day of the month, 2 digits with leading zeros 01 to 31</blockquote>
    No need to translate number.

    date(‘D’)
    <blockquote>D A textual representation of a day, three letters Mon through Sun</blockquote>
    Now we know it’ll return Mon … Sun . So how to translate it ?
    – Apply your translate to translate file. it would any file you want to use or even with template file.
    – Translate Mon … Sun into your own language
    – And apply JText for this
    We’ll have

    JText::_(date('D'));

    And last thing with
    date(‘M’)
    <blockquote>M A short textual representation of a month, three letters Jan through Dec</blockquote>
    Yup ! Do something for Jan .. Dec

    Very easy rite ? Just split issue into small part and follow it step by step.

    Thank you,
    Viet Vu

    nsca Friend
    #566933

    Wich file should I translate?

    I have to replace text or a file?

    You explain the problem but not the solution!

    jooservices Friend
    #566961

    Hi there
    <blockquote>Wich file should I translate?</blockquote>
    You can apply into any language file you want to store and use. It would be template file.
    <blockquote>I have to replace text or a file? </blockquote>
    It’s already explained above by follow Joomla JText:: API 🙂 .

    Thank you,
    Viet Vu

    nsca Friend
    #567270

    <em>@jooservices 468601 wrote:</em><blockquote>Hi there

    You can apply into any language file you want to store and use. It would be template file.

    It’s already explained above by follow Joomla JText:: API 🙂 .

    Thank you,
    Viet Vu</blockquote>

    Thank you for your answer. But please, could you be more specific? I dont need “any file” I need an exact file, could you please give me an example like

    1) Ccreate “example.php” in “Nn/Yy” directory
    2) Paste “this code”
    3) “translate”

    Thank you in advance.

    jooservices Friend
    #567483

    Hi there
    # It’s so hard to say what’s exactly file. Please use logic instead.
    In basically you can use template language file.

    Note:// Actually i provided tips as logic concept. For each user case we can implement it as needed. Instead just “copy & paste”. By this way everything become more flexible and easier.

    Thank you,
    Viet Vu

    aliart Friend
    #567489

    Hi Viet,

    thank you for this thread, it’s important.

    Just please explain this step:
    <blockquote>- And apply JText for this
    We’ll have
    Code:

    JText::_(date(‘D’));
    </blockquote>
    where should I put this code?

    thank you

    nsca Friend
    #567564

    Im not paying to learn how to use logic, this template have an error so if you could be more precise will be appreciate. I need specific steps to resolve this.

    This is not a minor change, you are asking me to write code from zero with logic. Please another support member could help me?

    I renewed 2 times before my licence, but no more. Unfinished and bugged templates + not support… worse combination ever.

    nsca Friend
    #732674

    Im not paying to learn how to use logic, this template have an error so if you could be more precise will be appreciate. I need specific steps to resolve this.

    This is not a minor change, you are asking me to write code from zero with logic. Please another support member could help me?

    I renewed 2 times before my licence, but no more. Unfinished and bugged templates + not support… worse combination ever.

    jooservices Friend
    #567576

    Hi there
    Sorry about this . This’s tips / tricks post not tutorials 🙂
    That’s why everything explain with root cause reason and logic how to solve .

    Actually i already mentioned with team about that bug ( yes. confirmed it’s bug ). Team will fix it asap.

    Thank you,
    Viet Vu

    jooservices Friend
    #732686

    Hi there
    Sorry about this . This’s tips / tricks post not tutorials 🙂
    That’s why everything explain with root cause reason and logic how to solve .

    Actually i already mentioned with team about that bug ( yes. confirmed it’s bug ). Team will fix it asap.

    Thank you,
    Viet Vu

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 3 voices, and was last updated by  jooservices 9 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum