Index
2012-05-17 02:55 – Zdravko Subakov : [dabo-users] Subclassing menus and UI
2012-05-17 07:15 – Paul McNett : Re: [dabo-users] Subclassing menus and UI
2012-05-17 08:50 – Ed Leafe : Re: [dabo-users] Subclassing menus and UI
Back to top
[dabo-users] Subclassing menus and UI

Author: Zdravko Subakov

Posted: 2012-05-17 02:55:28   Link

Hi,

As I am planing to use Dabo for non English applications so there is a need to have my own Menus in application. What is the suggested way of doing it.

Beside just translating some of the menus to local languages Id like to dinamicly change UI for example: labels, menus etc for users prefered language. The idea is to store each textual component with a veriosns for each language in a database and then retrieve it as needed. Is there something I should be aware of ia there the proper way of doing it?

Z.

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/86F456A0112A43D3A657EE318E28F3C3@Perajoe

©2012 Zdravko Subakov
Back to top
Re: [dabo-users] Subclassing menus and UI

Author: Paul McNett

Posted: 2012-05-17 07:15:24   Link

On 5/17/12 12:55 AM, Zdravko Subakov wrote:

> As I am planing to use Dabo for non English applications so there is a need to have my own Menus in application. What is the suggested way of doing it.

> Beside just translating some of the menus to local languages Id like to dinamicly change UI for example: labels, menus etc for users prefered language. The idea is to store each textual component with a veriosns for each language in a database and then retrieve it as needed. Is there something I should be aware of ia there the proper way of doing it?

Subclassing menus and other ui elements should be fairly straightforward. We've tried

to make Dabo classes easily subclassable.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4FB4EBDC.2060708@ulmcnett.com

©2012 Paul McNett
Back to top
Re: [dabo-users] Subclassing menus and UI

Author: Ed Leafe

Posted: 2012-05-17 08:50:11   Link

On May 17, 2012, at 2:55 AM, Zdravko Subakov wrote:

> Beside just translating some of the menus to local languages Id like to dinamicly change UI for example: labels, menus etc for users prefered language. The idea is to store each textual component with a veriosns for each language in a database and then retrieve it as needed. Is there something I should be aware of ia there the proper way of doing it?

We are using the standard GNU gettext strategy for localization: wrap localized strings in the _() function, and then use the gettext tools to extract those strings and translate them dynamically. The translations are managed at https://translations.launchpad.net/dabo/ - if you have a Launchpad account and speak a language other than English, you can help the project by translating as much of the framework as you can into your language.

That said, this only helps for the framework strings; if you have your own strings for your app that need localization, there (currently) is no way to handle this. I could see extending the dLocalize class to work with both the framework translations as well as the app-specific translations, but I would imagine that this would not be a simple thing to do. Can you add a ticket for this so that it doesn't get forgotten? The ticketing system for dabo is at http://trac.dabodev.com

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/6AD6CAD0-2A27-4735-A099-1D229E785FF6@leafe.com

©2012 Ed Leafe