22 |
from OFS.Application import get_products |
from OFS.Application import get_products |
23 |
from AccessControl import ModuleSecurityInfo, allow_module, allow_class, allow_type |
from AccessControl import ModuleSecurityInfo, allow_module, allow_class, allow_type |
24 |
from PlacelessTranslationService import PlacelessTranslationService, log |
from PlacelessTranslationService import PlacelessTranslationService, log |
25 |
|
from Negotiator import negotiator |
26 |
from Products.PageTemplates.GlobalTranslationService import setGlobalTranslationService |
from Products.PageTemplates.GlobalTranslationService import setGlobalTranslationService |
27 |
import os, fnmatch, zLOG, sys, Zope, Globals, TranslateTags |
import os, fnmatch, zLOG, sys, Zope, Globals, TranslateTags |
28 |
|
|
58 |
translate = translation_service.translate |
translate = translation_service.translate |
59 |
getLanguages = translation_service.getLanguages |
getLanguages = translation_service.getLanguages |
60 |
getLanguageName = translation_service.getLanguageName |
getLanguageName = translation_service.getLanguageName |
61 |
negotiate = translation_service.negotiate |
def negotiate(langs, context): |
62 |
|
# deprecated! |
63 |
|
return negotiator.negotiate(langs, context, 'language') |
64 |
|
|
65 |
# import permissions |
# import permissions |
66 |
security = ModuleSecurityInfo('Products.PlacelessTranslationService') |
security = ModuleSecurityInfo('Products.PlacelessTranslationService') |
67 |
|
security.declarePublic('negotiator') |
68 |
security.declarePublic('negotiate') |
security.declarePublic('negotiate') |
69 |
security.declarePublic('translate') |
security.declarePublic('translate') |
70 |
security.declarePublic('getLanguages') |
security.declarePublic('getLanguages') |