[New Feature] Multi language support

Just what I need! However, Ukrainian is missing. Just sent an email to support asking to add Ukrainian to the list of languages.

Made this solution that reads all texts for the current page and in the Users current language in one Search. The result is put in a hidden Repeating Group. Each field then reads the Repeating Group.

The fields read in a consecutive order from first to last post in the Repeating Group and not by searching for an ID. A bit crude I agree, but it works for my little app for now.

Discovered that the ID must be a number/integer so that the Repeating Group can be sorted. I had it as Text first, but sorting got “wrong” with 10 or more items in the list.

Also, it’s easy to copy the Repeating Group from one page to another, and just changing the Page search constraint to the current page name.

Previously I used Placeholders instead of labels. I had to revert to labels to be able to make them language sensitive.

1 Like

Thanks for sharing. I guess you could also set a custom state on the page that is a list of “LanguageTexts” and then set that when the page loads and if the language is changed. Then you would not have that repeating group in your view (I know you can hide it, but still).

3 Likes

Super elegant. Will convert to this immediately. :slight_smile:

Hi, how difficult would it be to add Czech language and localization to your app? :slight_smile::palm_tree:
I would love to see it in the list and be able to use it in the future :slight_smile:

Pretty easy. Email us at support@bubble.is and we’ll send you the file of texts to translate and we’ll push it :slight_smile:

1 Like

I must be slow but it just occurred to me that beside the conditional tab approach, this should also allow to handle all the texts through a new data type (let’s say “dictionary entry”)

And then the content of all text and input elements with simple formatting would be something like: “’ Do a search for dictionary entry where language=current language and text_id=xx”

This allows to only maintain once the element using the same text and to do facilitate the import of the text ressources from a file.

Has anyone gone down that road ? Any concern, or performance issue ?

very best

I think this is what @philledille did, except he made a search only once for each page and stored all the relevant text for that page. That would improve performance a lot.

His versoin “dictionary entry” contains then a key for the element where the text should be shown and the page name so that it is easy to retrieve all relevant entries for a page.

1 Like

So I tried to benchmark the two approaches before implementing

in a first page 256 text elements run a "search for’’ to get the right language text

in another page a hidden repeating group does a sing search that retuns 256 items and 256 text elements point to the repeating group items

I compared the page load performance with https://tools.pingdom.com/ and https://developers.google.com/speed/pagespeed/insights/ a few times.

The outcome is that I couldn’t observe material difference between the loading time of each approach.

Therefore unless I missed something, the two approaches should offer similar performance.

Compared to a bubble empty page ~0.9s, the cost of loading 256 text fields was around 1.5s on the location and time I did the tests

1 Like

I rewrote the language functionality using a field in User. The field is a thing of type LanguegeText which contains the texts. All texts of the chosen language is loaded in the Header. It’s only loaded at start (when it’s empty) or when the user changes the language:

Hello,

So @emmanuel, the multi-language support translates all the “bubble”'s application messages & emails that I found in the settings…

But what about all the texts of the buttons (and others) in my app? do I have to set the conditions manually like “when language field on the user type is Spanish this button text is HOLA; when language field on the user type is Italian this button text is CIAO…”?

thanks!

Yes you do, currently.

Ok, thanks.

is there some scheduled upgrade to this functionality nearby?

Unfortunately no plan in the near term.

You can use localizejs.com, but not for free. It will give you all the proper support for localization though.

2 Likes

Gotta love the evoultion that bubble constantly undergoes! :slight_smile:

Two questions regarding the translations.

  1. Is it anyhow possible to use the current language variable with a language object instead of a text? I’d like to have the language options in the app some different possibilities to display (as in english, English, EN, eng, en_gb, also local names for the languages i.e finnish = suomi, german = deutsch,…) and that would be much more convenient when the language in question would be a thing with specific fields used to display data. Presently it fails to update the current language from a fitting field in the thing…
  2. I’d love to use Estonian language and will gladly offer my help translating the core messages. I sent an email to bubble support yesterday regarding that but no answer as of yet.
    @emmanuel

Also, standard i18n import/export support would be a killer feature. Shouldn’t be too difficult to implement either - regarding the functions already present.

1 Like

I don’t see any email regarding estonian, please check.

The mail has somehow vanished from my mail system, so it probably didn’t go out either. Strange. Sent another one.

Should be OK, sent the translations.
Could you also advise about my first question?

I’m not sure I understand question 1), sorry.