maschmann / TranslationLoaderBundle

Symfony2 bundle with database translation loader
23 stars 9 forks source link

mapping xlf to xliff loader #17

Closed rufinus closed 10 years ago

rufinus commented 10 years ago

quick fix to mapping xlf file ending to the xliff loader.

maschmann commented 10 years ago

I'll do a small refactoring on the import command to enable configuration of file extension -> loader mapping. Although at the moment it seems there's only the xliff case.

rufinus commented 10 years ago

It should be a problem with YAML to. YamlFileLoader => .yml

see http://symfony.com/doc/current/components/translation/introduction.html#component-translator-message-catalogs

someone should adopt the same function as it is in the config with the LoaderResolver see http://symfony.com/doc/current/components/config/resources.html http://api.symfony.com/2.4/Symfony/Component/Config/Loader/LoaderResolver.html (@webmozart what ya think?)

maschmann commented 10 years ago

I agree, solving this problem and introducing the ability to have several extensions for a loader seems to be the better approach here. Also it adds a more consistent behavior to the whole loading mechanism. Since the TranslationLoaders already depend on the Config component, it wouldn't be too far stretched to make use of a similar loading process.