Will getx automatically convert my string to the languages it supports - flutter

I wanted to enable internationalization in my app. I am already using getx so i am going to use it to enable internationalization. However i had a confusion, in the getx page, there are these many languages that it supports. I was wondering if i would have to give a Translations class with the strings i want to only convert to these languages or would getx automatically do it for me. In other words, would i have to provide strings for these languages too, or will my text automatically be translated to these languages by getx

These languages are available for Getx readme file and if you click on them you will see a readme in that language,
You must provide the translated strings to Getx material app.
You can use google translate, Excel, or this VS Code extension to translate strings automatically

Related

Flutter text widgets to use

Need help to understand if Flutter can help us.
We are looking at flutter for app development for a rewrite of a js electron for desktop and js webview for mobiles.
It is basically a sophisticated reading app with multiple dictionaries and searching algorithms and other features specific to an Asian language and also English parallel translations.
We want to display Religious books in the native Unicode language with extensive dictionary support.
The books will have some bold and heading text markup (the markup style can be any format but we currently use html styles).
The books will be in a sqlite DB and streamed to the user.
The books will be stored in the db by paragraph.. We need to display this in a built up flow to the user.
The books will have some items which can be displayed or hidden upon user request but we can regenerate the display if needed. (currently it does live through js).
The books will need to communicate if a tap() or Textselect() event has been called (we often tap to select a word and it goes to a custom dictionary).
Searching for strings in the book will be done by paragraph and then we need to 1) highlight the text and bring the user to that text.
We wish to implement infinite scroll or "Lazy load" as the books are very big and often text processing to change the native script font is involved before display.
Conclusion
I think this captures much of what we want to have.
I have done some work in flutter, but i'm very new to it.
It seems that there is a SelectableText.rich widget and perhaps we could connect them together in an infinite scroll list widget from pub.dev
For hiding the page numbers.. and alt readings, it is fine to reload the book and remove those as we feed the widget with text.
There are a few html widgets, but I'm not sure if it gives select and tap events.
Can Flutter do this for us?
Are there packages that I'm not aware of?
Am I heading in the wrong direction?
I have done a test called https://github.com/bksubhuti/mydbtest
It seems to work.. the selecting of texts are off by a few bits, but it is workable..
However, I have found a full app for my purpose already written in flutter with a sqlite philosophy already working. The dev and myself are in touch and the project has been upgraded to null safety. Flutter is awesome. In about a month.. part time.. I have learned flutter and written my first app and submitted it to the play store called Buddhist Sun. (pending approval). I use sqflite and the multiplatform eq for getting cities.. the db search of cities was more of a flutter tutorial for me than purpose.
https://github.com/bksubhuti/buddhist_sun
Flutter will be the language of the future. I'm so amazed at how great it works and all the packages on pub.dev

Correct implementations of Localization within the MVVM architecture pattern

I am new to flutter and am currently developing an app using the MVVM architecture pattern described in many of FilledStacks tutorials but am having issues with deciding what is the best way to manage context in the View Models.
I followed the Internationalization tutorial in the flutter docs for implementation of i18n and l10n which results in the need for BuildContext whenever a localized string is needed.
I am currently passing context from the Views build method as an arg to methods in which localized strings are used such as methods which return error text or for alert dialogues but this seems incorrect.
Is there a cleaner way to return Strings from the View Model without passing BuildContext as an argument while maintaining the "hot reload" of language if the user changes the device's language?
This question was answered for me on Reddit, I just wanted to add to it here in case anyone had a similar issue.
The basic premise is to use keys when using methods without context (such as in view models). Then use a translate function in the view when the context is accessible.

How do you organize messages to be translated in Flutter?

Please note i am not talking about the .abr files.
I have been following several tutorials on internationalization in Flutter using the intl package. I noticed that they always use a single AppLocalization class for storing all the messages that will be used in the application. Since it was a tutorial, I am wondering if we will always have to do it that way. I mean in a real application we will probably have hundreds messages to maintain. It would be a mess to put them all in a single class.
Maybe we should have a localization class for each Page?
What are your suggestions?
Flutter Intl package it's the right solution; also i used to Easy Localization.
This package has a "inherited widget " concept, so if you want to change automatically change UI for changed Local Language, it will be quite useful to you.
Maybe you want to localization JSON update to server and use application new key-value without deploy store. EasyLocalzation does read the server-side JSON file.

Flutter TextFormField built in validators?

Are there no built in validators for common use cases such as emails, phone numbers, etc. in the Flutter framework?
The web is littered with examples of people implementing their own email validating functions in Dart, but I'm surprised that there doesn't seem to be any built in ones in Flutter, like a FormFieldValidator.email, etc. Or did I just not find it?
If you find that some sort of functionality is missing from Flutter out of the box, chances are that someone has created a package for Flutter (or you can). Just check the pub.dev website and filter by Flutter.
I've had a look and there is a package called 'flutter_form_builder' https://pub.dev/packages/flutter_form_builder
This package helps in generation of forms in Flutter by providing the
syntactic sugar for creating a Form Widget and reduce the boilerplate
needed to build a form, validate fields, react to changes, and collect
the value of the Form in the form of a map.
....
FormBuilderTextField - For text input. Allows input of single-line
text, multi-line text, password, email, urls etc by using different
configurations and validators

Which WPML method of string translation should I use?

I am trying to translate my WordPress website (built using Brooklyn theme) but I do not know which method to use to translate my strings. At first, the strings weren't showing up in the string translation search but then I learned that I had to add more code.
My first question is, do I have to go through every single page and custom CMS entry that I use to update content and wrap everything in code, or is there a way to do that automatically?
Secondly, I use Brooklyn theme but their support team is so slow so I wanted to ask if there was a standard way to find the theme's text-domain to include in the code (if I need it).
Thirdly, I know the options I have with which method to use to translate strings (manual registration or GetText) but I haven't found any explanation relating to where to put this code and how to implement it (even the official documentation gives you the code but doesn't explain what to do with it and I'm not a PHP expert!)
I'm using all the latest versions of WPML and the multilingual CMS.
http://www.expedition-polaris.com
Yes, you'll have to wrap all strings that you want translated with one of the localization functions ( https://codex.wordpress.org/L10n ) : __(), _e(), _n(), etc.
If you have already purchased the Brooklyn theme, then grep through the source for either _e( or __(, to find out the text-domain., or if you run the scan function via the String Translations admin page, the text-domain should be listed for the theme.