NetTalk Central

Author Topic: NT8 Runtime translation on footer error  (Read 4617 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT8 Runtime translation on footer error
« on: April 07, 2014, 09:52:13 AM »
Hi,
I have a hand coded footer wich includes the Session EXpire div

I tried to translate the "Session Expires on" to "La Sesión Expira en"
but it change the ó to a group of chars
see image

In the same code I´m translating "Privacy Policy" to "Política de Privacidad"
and it is translated ok
see image

How can I solve it?

Thanks

[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #1 on: April 08, 2014, 06:12:17 AM »
what does your new code look like?

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 Runtime translation on footer error
« Reply #2 on: April 08, 2014, 06:25:03 AM »
As you can see in the image in my last post...

if p_web.GetSessionLoggedIn()
    packet.append(p_web.AsciiToUTF(|
        '<div class="nt-left nt-countdown">'&p_web.Translate('Session Expires In')&'<div id="countdown"></div></div>'))
END

packet.append(p_web.AsciiToUTF('<div class="nt-footer nt-right>'))
if p_web.IsMobile()=0
    packet.append(p_web.AsciiToUTF(|
  '<span class=" nt-center"><13,10>'&|
      '<<a class="link_gris" href="UserAgreement">'&p_web.Translate('User Agreement')&'<</a>&nbsp;&nbsp;'&|
      '<<a class="link_gris" href="PrivacyPolicy">'&p_web.Translate('Privacy Policy')&'<</a>&nbsp;&nbsp;'&|
      '<<a class="link_gris" href="javascript:var win=open('''&'./help/html/Index_'&CHOOSE(P_WEB.GSV('LOGIN_LNGHLP')<>'',P_WEB.GSV('LOGIN_LNGHLP'),P_WEB.GSV('LOGIN_LNG'))&'.html'&''',''DwsHelpPage'',''width=900,height=500,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizeable=yes'');" alt="'&p_web.Translate('Click here for help')&'" >'&p_web.Translate('Help')&'</a>'&|
  '</span><13,10>'&|
        '',net:OnlyIfUTF,net:StoreAsAscii))
END
packet.append(p_web.AsciiToUTF('</div>'))
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #3 on: April 08, 2014, 07:50:17 AM »
sorry, I must be dense - in the image, and your code, it all looks like English to me - I'm not seeing the spanish translations...

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 Runtime translation on footer error
« Reply #4 on: April 08, 2014, 07:57:58 AM »
The translation is done from English to Spanish and you can see the error on the foot1.png of my first post.
I´ve attached it here again...


[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #5 on: April 08, 2014, 09:11:22 PM »
correct - that is the result of the translation.
What I am trying to see are the changes you made to the code. You said;

>> I tried to translate the "Session Expires on" to "La Sesión Expira en"

and I'm not seeing where / how you did that translation.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 Runtime translation on footer error
« Reply #6 on: April 09, 2014, 02:56:58 AM »
I was wrong...It has nothing to do with the translation...

I´ve added the Spanish string without transtlate it and the same error
Please see image ...

In the countdown div the string is wrong, in the other the string is ok.

May be it has to do with the class used in the DIV?



[attachment deleted by admin]
« Last Edit: April 09, 2014, 03:46:18 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #7 on: April 09, 2014, 04:12:20 AM »
I think it's best if you just post an example app. I'm obviously not explaining to you what I need to see, and pictures of the output are completely useless to me. If you post an example then I can see what you have done, and duplicate the effect here.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 Runtime translation on footer error
« Reply #8 on: April 10, 2014, 03:32:08 AM »
I´m really concern.
I cant reproduce it, I copy the same code to the Web3 example and it work ok.
I dont know why in my app it does not work.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #9 on: April 10, 2014, 05:03:52 AM »
check that the settings on the "Advanced' tab in the webserver (Charset & StoreAs) are set the same as in your app. Also make sure you have the same code embedded in WebHandler, Translate method, if that is in your app.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 Runtime translation on footer error
« Reply #10 on: April 12, 2014, 11:49:19 AM »
May be it is because of the 2nd parmeter of the Translate proc?

ReturnValue = parent.Translate(ReturnValue,p_AllowHtml)

I never use it, I allways call it like

p_web.Translate('yadayada')


-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 Runtime translation on footer error
« Reply #11 on: April 13, 2014, 10:54:55 PM »
there are obviously many, many things it might be caused by. Unfortunately I can't predict which one of them might apply to your application. I would need an example app to duplicate the effect to make any useful comments.

cheers
Bruce