Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change language? #22

Open
fab17an opened this issue Apr 25, 2020 · 1 comment
Open

change language? #22

fab17an opened this issue Apr 25, 2020 · 1 comment

Comments

@fab17an
Copy link

fab17an commented Apr 25, 2020

good, a query, I see that you have to put multi-languages, in that case how can you do to change it or assign another language so that it comes out by default, other than in English?

@o1298098
Copy link
Owner

vscode-flutter-i18n-json
I use this as a localization, you can view this document,

 static String language = ui.window.locale.languageCode;
 static String region = ui.window.locale.countryCode;

 static Future<VideoListModel> getFavoriteMovies(int accountid,
      {int page = 1, String sortBy = 'created_at.asc'}) async {
    VideoListModel model;
    String param =
        '/account/$accountid/favorite/movies? 
       api_key=$_apikey&language=$language&session_id=$session
       &sort_by=$sortBy&page=$page';
    var r = await _http.request(param);
    if (r != null) model = VideoListModel(r);
    return model;
  }

TBMD API requests data based on your system language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants