Just one question: The localization example in B4XPages Project-zip sample has only one page. But if I have more pages and want to call the loc object (Localisator class) in B4XMainPage from another page, I have to use" CallSubDelayed" or B4XPages.GetPage("...").
I think it would be better to declare class and define "loc" object in the Main-Module in Activity_Create. Than it is accessible from everywhere just with Main.loc(...). Is that a good way to do?
Just one question: The localization example in B4XPages Project-zip sample has only one page. But if I have more pages and want to call the loc object (Localisator class) in B4XMainPage from another page, I have to use" CallSubDelayed" or B4XPages.GetPage("...").
I think it would be better to declare class and define "loc" object in the Main-Module in Activity_Create. Than it is accessible from everywhere just with Main.loc(...). Is that a good way to do?
I can't find an example of using Localizator in B4XPages so I tried to make it work in B4XPages with a simple example. Sub Process_Globals Private fx As JFX Private MainForm As Form Public Loc As Localizator End Sub Private Sub B4XPage_Created (Root1 As B4XView) Root =...
Thanks aeric, your example is, how I plant it to do. And still I am thinking, where is the best location to initialize loc (in Activity_Create?), as in B4A/B4i I have no Sub AppStart.
Main module::
Sub Activity_Create(FirstTime As Boolean)
Dim pm As B4XPagesManager
pm.Initialize(Activity)
If FirstTime Then
Loc.Initialize(File.DirAssets, "strings.db")
End If
End Sub
Thanks aeric, your example is, how I plant it to do. And still I am thinking, where is the best location to initialize loc (in Activity_Create?), as in B4A/B4i I have no Sub AppStart.
Main module::
Sub Activity_Create(FirstTime As Boolean)
Dim pm As B4XPagesManager
pm.Initialize(Activity)
If FirstTime Then
Loc.Initialize(File.DirAssets, "strings.db")
End If
End Sub