Hi,
I'm having problems with the JavaScript (CSS) pop up calendar and
pt_BR language.
Whenever I switch to Brazilian Portuguese Language I can't get this
little pop up calendar with proper information (days, days of week,
etc).
Investigating, I found that for some reason, the language code
isn't being passed (constructed) correctly and the wrong calendar
javascript function is being called.
Below is a portion of the page source code in pt_BR (Brazilian
Portuguese) language and then in English (en).
---------pt_BR------------------------
<td>
<div class="label">
<label for="field.begindate"
title="Iniciar a busca desta data.">Data Inicial</label>
</div>
</td><td>
<span class="field"><input class="textType" id="field.begindate"
name="field.begindate" size="10" title="DD-MM-YYYY" type="text"
value="05-06-2006" />
<style type="text/css">@import url(++resource++calendar-win2k-1.css);</style>
<script type="text/javascript" src="++resource++calendar.js"></script>
<script type="text/javascript" src="++resource++calendar-pt.js"></script>
<script type="text/javascript"
src="++resource++calendar-setup.js"></script><img
src="++resource++jscalendar.gif" id="field.begindate_launch_img"
style="cursor: pointer;" title="Seletor de datas"
onmouseover="this.style.background='black';"
onmouseout="this.style.background=''"/>
<script type="text/javascript">
Calendar.setup({inputField: "field.begindate", ifFormat: "%d-%m-%Y",
showsTime: false,
button: "field.begindate_launch_img", singleClick: true});
</script></span>
</td>
---------------------------
Now in English:
<td>
<div class="label">
<label for="field.begindate"
title="Start searching from this date.">First date</label>
</div>
</td><td>
<span class="field"><input class="textType" id="field.begindate"
name="field.begindate" size="10" title="MM/DD/YYYY" type="text"
value="06/05/2006" />
<style type="text/css">@import url(++resource++calendar-win2k-1.css);</style>
<script type="text/javascript" src="++resource++calendar.js"></script>
<script type="text/javascript" src="++resource++calendar-en.js"></script>
<script type="text/javascript"
src="++resource++calendar-setup.js"></script><img
src="++resource++jscalendar.gif" id="field.begindate_launch_img"
style="cursor: pointer;" title="Date selector"
onmouseover="this.style.background='black';"
onmouseout="this.style.background=''"/>
<script type="text/javascript">
Calendar.setup({inputField: "field.begindate", ifFormat: "%m/%d/%Y",
showsTime: false,
button: "field.begindate_launch_img", singleClick: true});
</script></span>
</td>
------------------------------------------
As you can see, when the language is pt_BR, the javascript
function being called is ++resource++calendar-pt.js instead of
++resource++calendar-pt_BR.js
How can I fix this?
Could someone else verify this? Just enable pt_BR in your portal,
switch to Brazilian Portuguese language and then try to launch the
javascript calendar.
The reason I'm asking is that since my computer locale is pt_BR
I'm not sure this is having any additional effect on Firefox/Zope/CPS
interaction about locales.
Thanks
--
Mario O.de Menezes, Ph.D. "Many are the plans in a man's heart, but
LinuxUser: #24626 is the Lord's purpose that prevails" Pv 19.21
http://www.ipen.br/~mario
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users