Jesway / flutter_translate

Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.
MIT License
403 stars 118 forks source link

How can I use localization files from the Document folder? #72

Closed maksym-ostrovyj-ew closed 3 years ago

maksym-ostrovyj-ew commented 3 years ago

Hello. I try to use another path for my localization files

var delegate = await LocalizationDelegate.create( ... basePath: '/data/user/0/com.example.app/app_flutter/i18Sources/' ... supportedLocales: [ 'en_EN', 'pt_PT', 'pt_BR', ]

but I still have this Unhandled Exception: Unable to load asset: /data/user/0/com.example.app/app_flutter/i18Sources/en.json

Is there any way to use localization files outside of the assets folder?

bratan commented 3 years ago

@kabazyba - The assets need to be located within the assets bundle, there is no other alternative for now.