test
Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • waelali Friend
    #445148

    <em>@phill luckhurst 309419 wrote:</em><blockquote>This appears to be a bug with K2 and their language files.

    The code that calls these strings is for instance

    <th colspan=”2″><?php echo JText::_( ‘Account details’ ); ?></th>

    Please not the capitalization – Account Details

    In your language files you have no matching strings only ones that are all in capitals. As such you will need to add all these to your language file.</blockquote>

    You did not submit a code 🙂 I cannot see it.
    Can you give example??

    maybe k2_account_details ??

    Phill Moderator
    #445149

    You will need to search for all the language strings that need translating. There are quite a lot of them so I cannot give you the code for all.

    waelali Friend
    #445150

    Where is this code exist??


    <th colspan="2"><?php echo JText::_( 'Account details' ); ?></th>

    maybe we can change this to
    <blockquote><th colspan=”2″><?php echo JText::_( ‘K2_ACCOUNT_DETAILS ); ?></th></blockquote>

    and then we can pick up the translation from the files!!??

    Phill Moderator
    #445157

    No, you should add the translations to the language files. Again, there seem to be quite a lot of them and it would take quite a bit of time to go through them all to create translations.

    I use the excellent wingrep tool to search for the strings.

    waelali Friend
    #445158

    <em>@phill luckhurst 309431 wrote:</em><blockquote>No, you should add the translations to the language files. Again, there seem to be quite a lot of them and it would take quite a bit of time to go through them all to create translations.

    I use the excellent wingrep tool to search for the strings.</blockquote>

    I will use that tool since windows 7 search is stupid.
    But, I am sorry I cannot understand your answer. What a lot of them??
    What i need is just to translate 2-3 phrases.

    Lets talk about translating “Account details”… This should be added to Translations file, which is already exist in other way as K2_ACCOUNT_DETAILS, but the system is not picking up that because “Account details” is not configured or coded well in the php file maybe.

    waelali Friend
    #445161

    In register.php in line 41 , we have:

    <th colspan="2"><?php echo JText::_( 'Account details' ); ?></th>

    How can I add “Account details” to the translations code??
    Give me one hint how to write that in translation file please !!!!

    Please have a look on this code from register.php

    <div id="k2Container" class="k2AccountPage">

    <table cellpadding="0" cellspacing="0">
    <tr>
    <th colspan="2"><?php echo JText::_( 'Account details' ); ?></th>
    </tr>
    <tr>
    <td><label id="namemsg" for="name"><?php echo JText::_( 'Name' ); ?></label></td>
    <td><input type="text" name="name" id="name" size="40" value="<?php echo $this->escape($this->user->get( 'name' )); ?>" class="inputbox required" maxlength="50" />
    * </td>
    </tr>
    <tr>
    <td><label id="usernamemsg" for="username"><?php echo JText::_( 'User name' ); ?></label></td>
    <td><input type="text" id="username" name="username" size="40" value="<?php echo $this->escape($this->user->get( 'username' )); ?>" class="inputbox required validate-username" maxlength="25" />
    * </td>
    </tr>
    <tr>
    <td><label id="emailmsg" for="email"><?php echo JText::_( 'Email' ); ?></label></td>
    <td><input type="text" id="email" name="email" size="40" value="<?php echo $this->escape($this->user->get( 'email' )); ?>" class="inputbox required validate-email" maxlength="100" />
    * </td>
    </tr>
    <tr>
    <td><label id="pwmsg" for="password"><?php echo JText::_( 'Password' ); ?></label></td>
    <td><input class="inputbox required validate-password" type="password" id="password" name="password" size="40" value="" />
    * </td>
    </tr>
    <tr>
    <td><label id="pw2msg" for="password2"><?php echo JText::_( 'Verify Password' ); ?></label></td>
    <td><input class="inputbox required validate-passverify" type="password" id="password2" name="password2" size="40" value="" />
    * </td>
    </tr>

    If you look to :
    <th colspan="2"><?php echo JText::_( 'Account details' ); ?></th>
    , so we do not get tranlation to ‘Account details’, because we do not have translation to it in this way of codeing.

    However, if you look at
    <label id="usernamemsg" for="username"><?php echo JText::_( 'User name' ); ?></label></td>

    OR

    label id="emailmsg" for="email"><?php echo JText::_( 'Email' ); ?></label></td>

    Or many others , which are written in the same way of coding , we still get translation of them into Arabic.

    It is strange and confusing me.

    Phill Moderator
    #445167

    The JText:: part tells Joomla to look in the language files for whatever string is between the ‘ ‘ marks. So if in the K2 language file we put

    Account details=your translation here

    That would work then do the similar for each of your strings

    However, that too would be wrong (by todays standards) because in Joomla we should not have spaces in the JText part nor in the language file. It seems to work in the J1.5 version of K2 but in both locations the string should have been IMHO Account_details. In Joomla 1.5 spaces were allowed but not recommended so I can see why they were still there. For J1.6 onwards no space was allowed. I mention this just in case you in the future update to J2.5.

    waelali Friend
    #445168

    I guess I solved the problem. I translated the phrases , added them to translation files , and then changed the register.php file according to translations.

    Thank you

    waelali Friend
    #445170

    <em>@phill luckhurst 309441 wrote:</em><blockquote>The JText:: part tells Joomla to look in the language files for whatever string is between the ‘ ‘ marks. So if in the K2 language file we put

    Account details=your translation here

    However, that too would be wrong because in Joomla we should not have spaces in the JText part nor in the language file. It seems to work in the J1.5 version of K2 but in both locations the string should have been IMHO Account_details.

    JA are very partly to blame for not picking it up and reporting it back to K2 here. In our overrides we simply take the original K2 code and adjust the layout. However, we do not edit the language files in any way so we stick to whatever K2 has done. It seems many of their language strings from Joomla 1.5 contained spaces but the jave corrected that for the J2.5 version.</blockquote>

    I have added Account details, as K2_Account_details, with no spaces, and translated it into the translation file , and then changed that in register.php

    waelali Friend
    #445171

    Can you take a look on this thread please

    http://www.joomlart.com/forums/topic/k2-user-login-and-registration-like-in-ja_social-template/

    and maybe you can help me with it please!!

Viewing 10 posts - 16 through 25 (of 25 total)

This topic contains 25 replies, has 3 voices, and was last updated by  waelali 12 years, 9 months ago.

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