Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
localization and text replacement
dbh03079
I need to generate a localized caption on a report which has a portion of the caption replaced by data from a field in my database. For example:
In English, the caption is "5 day cycle"
In Spanish, the caption is "ciclo de 5 d?as"
where the "5" comes from a database field.
My initial thought was that the strings in my resource file would be something like this:
English: "%cycle% day cycle"
Spanish: "ciclo de %cycle% dias"
and then replace the string "%cycle%" with the database value.
Is this possible to do or is there a better solution?
Find more posts tagged with
Comments
LeinadJan
<blockquote class='ipsBlockquote' data-author="'dbh03079'" data-cid="66466" data-time="1279212381" data-date="15 July 2010 - 09:46 AM"><p>
I need to generate a localized caption on a report which has a portion of the caption replaced by data from a field in my database. For example:<br />
<br />
In English, the caption is "5 day cycle"<br />
In Spanish, the caption is "ciclo de 5 d?as"<br />
<br />
where the "5" comes from a database field.<br />
<br />
My initial thought was that the strings in my resource file would be something like this:<br />
<br />
English: "%cycle% day cycle"<br />
Spanish: "ciclo de %cycle% dias"<br />
<br />
and then replace the string "%cycle%" with the database value.<br />
<br />
Is this possible to do or is there a better solution?<br /></p></blockquote>
<br />
Hello,<br />
<br />
do you have many labels to translate ? The esiest way of doing that will ask you to create 2 field per columns. Then you set the hidden property to true when your language parameter is EN or SP. In your fields you will write "Ciclo de " + row['CYCLE'] + " dias" or row['CYCLE'] + " day cycle"
dbh03079
<blockquote class='ipsBlockquote' data-author="'LeinadJan'" data-cid="66473" data-time="1279220330" data-date="15 July 2010 - 11:58 AM"><p>
Hello,<br />
<br />
do you have many labels to translate ? The esiest way of doing that will ask you to create 2 field per columns. Then you set the hidden property to true when your language parameter is EN or SP. In your fields you will write "Ciclo de " + row['CYCLE'] + " dias" or row['CYCLE'] + " day cycle"<br /></p></blockquote>
<br />
Thanks for your reply. Right now I only have a couple labels that need this type of modification, but there are also other similar situations that may require modification of the translated text. Also, I only provided two languages in my example and I need a solution that is generic so that if translation to a new language is required then I don't need to change the rptdesign file itself.
LeinadJan
Have you try to create a stringbundle object ?
Look at that page :
https://developer.mozilla.org/en/Localizing_an_extension
maybe it can help you.