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

language support in a tcell application #655

Closed
vlappa opened this issue Nov 30, 2023 · 1 comment
Closed

language support in a tcell application #655

vlappa opened this issue Nov 30, 2023 · 1 comment

Comments

@vlappa
Copy link

vlappa commented Nov 30, 2023

As a general question, how does one typically support multiple languages in a Go application?

More specifically, how can this be done in a Tcell application and are there examples available?

@gdamore
Copy link
Owner

gdamore commented Dec 3, 2023

Tcell doesn't have any special things for languages, apart from support for Unicode characters.

The views package probably will yield mixed results when working with Right to Left or BiDi languages (such as Hebrew or Arabic.) But that's a supplemental package and not part of tcell proper really.

Handling i18n (internalization) is a much larger topic. I don't know that Go has support for gettext or similar APIs, although someone probably has developed something here. Of course it is usually a bigger task than just swapping out text -- for example if you have format strings then you may need to change word order based on context, etc.

None of this is specific to tcell.

A quick google search came up with a first hit: https://github.com/nicksnyder/go-i18n

Here's a blog post: https://www.alexedwards.net/blog/i18n-managing-translations

These were found trivially with a cursory search in google, using "golang i18n". (The i18n is the magic string you want to look for, as its the industry standard way to refer to internationalization of software.)

I'm closing this as there is nothing further here for us to do in Tcell.

@gdamore gdamore closed this as completed Dec 3, 2023
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