Skip to content

Localization example #127

@JCash

Description

@JCash

Describe the example you'd like
I'd like to showcase our text layout feature that supports proper unicode layout, e.g. for RTL languages.
I think having a "localisation" example is a good way to do it.

It could either be in a "game menu" with the different buttons, but as a layout example, it may be too small.

Some notes/ideas:

  • Use .appmanifest to enable the font layout feature

In example:

  • Choose localization (english, arabic, ...) via some in game button
  • add the extra font for arabic if selected. And remove it if deselected:
    • See font.add_font()/font.remove_font()
  • Get the localized text (e.g. lorem ipsum)
    • E.g. load from disk
  • See the text change (LTR, RTL) on screen

Note, the font.add_font() creates the font on-the-fly, so it may cause a delay in game. It would be good to experiment with loading the font + text_<language>.json from within a collection proxy, and then "hook up" the original font collection with the new font.

Lorem ipsum for different languages:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions