Jesway / flutter_translate

Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use localization files from the Document folder?

maksym-ostrovyj-ew opened this issue · comments

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?

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