def getHelpFile(self):
     name = "distribucionPoblacionPorCentros"
     extension = ".xml"
     locale = PluginsLocator.getLocaleManager().getCurrentLocale()
     tag = locale.getLanguage()
 
     helpPath = getResource(__file__, "help", name + "_" + tag + extension)
     if os.path.exists(helpPath):
         return File(helpPath)
     #Alternatives
     alternatives = PluginsLocator.getLocaleManager().getLocaleAlternatives(locale)
     for alt in alternatives:
         helpPath = getResource(__file__, "help", name + "_" + alt.toLanguageTag() + extension )
         if os.path.exists(helpPath):
             return File(helpPath)
     # More Alternatives
     helpPath = getResource(__file__, "help", name + extension)
     if os.path.exists(helpPath):
         return File(helpPath)
     return None
Example #2
0
    def getHelpFile(self):
        name = "convertfieldtodate"
        extension = ".xml"
        locale = PluginsLocator.getLocaleManager().getCurrentLocale()
        tag = locale.getLanguage()
        #extension = ".properties"

        helpPath = gvsig.getResource(__file__, "help", name + "_" + tag + extension)
        if os.path.exists(helpPath):
            return File(helpPath)
        #Alternatives
        alternatives = PluginsLocator.getLocaleManager().getLocaleAlternatives(locale)
        for alt in alternatives:
            helpPath = gvsig.getResource(__file__, "help", name + "_" + alt.toLanguageTag() + extension )
            if os.path.exists(helpPath):
                return File(helpPath)
        # More Alternatives
        helpPath = gvsig.getResource(__file__, "help", name + extension)
        if os.path.exists(helpPath):
            return File(helpPath)
        return None