[Geoprisma-users] i18n_* tooltip messages are showing

Yves Moisan yves.moisan at boreal-is.com
Mon Jan 11 10:09:15 EST 2010


Le vendredi 08 janvier 2010 à 23:02 -0500, Stephen Woodbridge a écrit :
> What cases the i18n_* text to be displayed instead of the actual 
> language text. For example the text "i18n_fullzoom_tooltip" 

I can't find that string in any of the po files.  Is that a string of
yours ?  

If i18n strings work but not this one, then you have to ensure you have
valid .pot/.po/.mo files for the *domain* (defined in the php file of a
particular widget).  Also, there are times when you need to restart
Apache for GetText to pick up a new string.  

If you don't want to bother with domains (you should if you develop a
new widget though) you can use the language code syntax as mentioned in
the docs.  

For example in this case :

<shortcut>
    <name>MyShortcutWidget</name>
    <options>
        <field>hap_nm_top</field>
        <emptyText>
            <domain>sampleFile</domain>
            <key>i18n_shortcut_emptyText</key>
        </emptyText>
    </options>
</shortcut>

GetText will look for the "i18n_shortcut_emptyText" string in the
sampleFile.mo (compiled po) file and will render it in whatever language
as determined in the cookie by the last lang= URL parameter assignment.
Beware : the value of the language parameter lives for as long as it is
not changed, so if you set it to fr_CA once it will always be that
unless you explicitly change it in the url.  That can be misleading
because the default language is English, which is what you get if you
don't pass a lang url parameter; however if you set it to another
language then that language becomes the default and then you'll wonder
why you see some French while there is no lang url parameter.

If you want to bypass having to create a po file (which you then need to
compile into an mo with an editor like poEdit), you can use the
"language code" syntax as follows : 

<shortcut>
    <name>MyShortcutWidget</name>
    <options>
        <field>hap_nm_top</field>
        <emptyText>
            <fr_CA>Racourcie sur le top</fr_CA>
            <en_US>Shortcut to top</en_US>
            <!-- Other lang -->
        </emptyText>
    </options>
</shortcut>

HTH,

Yves

> is being 
> displayed regardless of ?lang=en_US or ?lang=fr_CA or no lang argument.
> 
> $g_strLocaleDir = '/u/software/geoprisma/trunk/languages' which it correct.
> 
> -Steve




More information about the Geoprisma-users mailing list