Hi,
If one wants his seaside app: - to be available in many languages - use the browser language as default, but is able to switch language from menu Some experience to share - some best practices or code? Thx T. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Torsten,
seaBreeze which is a well-known extension to Seaside comes with Internationalization pre-built in and specially for you with German translations. It ships with VisualWorks 7.10. Georg Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812 Wallstraße 22, 06366 Köthen Tel. +49-3496-214328, Fax +49-3496-214712 -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Torsten Bergmann Gesendet: Freitag, 18. Oktober 2013 08:07 An: [hidden email] Betreff: [Seaside] I18N these days Hi, If one wants his seaside app: - to be available in many languages - use the browser language as default, but is able to switch language from menu Some experience to share - some best practices or code? Thx T. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Torsten,
I have my own implemetation of a RKATranslator class. I write the translations into mongodb and have a small data entry solution in my app where also customers could (later) edit additional languages (and I use it myself for new translations). In the app, if I need a translation, I ask the current sessions translator instance (one for each language) for the translation e.g. >>self translator labelCurrency In RKATranslator I have overwritten doesNotUnderstand: and the translator asks mongo for the translation (key in the database is the selector in above example labelCurrency). I do also cache some fixed values, e.g. a list of *sorted* countries in each language. Otherwise, I would have to sort the countries each time, the view with countries is displayed. This would not make sense for performance. My solution is small and for my requirements, til now, it works fine. It is a nice Idea to set the browser language as default. I will think about it. Sabine On Fri, Oct 18, 2013 at 8:23 AM, Georg Heeg [via Smalltalk] <[hidden email]> wrote: > Torsten, > > seaBreeze which is a well-known extension to Seaside comes with > Internationalization pre-built in and specially for you with German > translations. It ships with VisualWorks 7.10. > > Georg > > Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812 > Wallstraße 22, 06366 Köthen > Tel. +49-3496-214328, Fax +49-3496-214712 > > > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Torsten Bergmann > Gesendet: Freitag, 18. Oktober 2013 08:07 > An: [hidden email] > Betreff: [Seaside] I18N these days > > Hi, > > If one wants his seaside app: > - to be available in many languages > - use the browser language as default, but is able to switch language from > menu > > Some experience to share - some best practices or code? > > Thx > T. > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://forum.world.st/I18N-these-days-tp4715507p4715508.html > To start a new topic under Seaside General, email > [hidden email] > To unsubscribe from Seaside, click here. > NAML |
In reply to this post by Torsten Bergmann
There is a ConfigurationOfGettext here:
http://smalltalkhub.com/#!/~PharoExtras/Gettext I also added a package that uses the Refactoring engine to find all the strings in my program and attempt to detect if they should be translated, then add the necessary methods to do the translation. It works in Pharo 1.3 hth Paul On Oct 17, 2013, at 11:06 PM, Torsten Bergmann <[hidden email]> wrote: > Hi, > > If one wants his seaside app: > - to be available in many languages > - use the browser language as default, but is able to switch language from menu > > Some experience to share - some best practices or code? > > Thx > T. > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Paul, I see that you have made changes to the configuration of GetText. Now, since you didn't base your changes on the latest version of the configuration (ConfigurationOfGettext-usmanbhatti.5) but instead you chose to modify ConfigurationOfGettext-HilaireFernandes.3 that dates from last year. So, now we have two distinct branches for the configuration of GetText.
I tried to merge the two branches but I cannot because the evolutions of the two branches are non-trivial and distinct. Now, GetText has only one package so I can drop the other branch and use your work but as the branching is not very well-supported by the tools, it would be good to take care of this point in the future.
regards, Usman Bhatti On Fri, Oct 18, 2013 at 6:11 PM, Paul DeBruicker <[hidden email]> wrote: There is a ConfigurationOfGettext here: _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Usman,
Yes I saw that the Config you were working from did not have any baselines specified (which I think is not advised) and so chose to use a version that I'd been keeping for myself that did. Paul On Oct 19, 2013, at 1:17 PM, Usman Bhatti <[hidden email]> wrote: > Hi Paul, > > I see that you have made changes to the configuration of GetText. Now, since you didn't base your changes on the latest version of the configuration (ConfigurationOfGettext-usmanbhatti.5) but instead you chose to modify ConfigurationOfGettext-HilaireFernandes.3 that dates from last year. So, now we have two distinct branches for the configuration of GetText. > > I tried to merge the two branches but I cannot because the evolutions of the two branches are non-trivial and distinct. Now, GetText has only one package so I can drop the other branch and use your work but as the branching is not very well-supported by the tools, it would be good to take care of this point in the future. > > regards, > > Usman Bhatti > > > > > > On Fri, Oct 18, 2013 at 6:11 PM, Paul DeBruicker <[hidden email]> wrote: > There is a ConfigurationOfGettext here: > > http://smalltalkhub.com/#!/~PharoExtras/Gettext > > > I also added a package that uses the Refactoring engine to find all the strings in my program and attempt to detect if they should be translated, then add the necessary methods to do the translation. It works in Pharo 1.3 > > > > hth > > Paul > > > On Oct 17, 2013, at 11:06 PM, Torsten Bergmann <[hidden email]> wrote: > > > Hi, > > > > If one wants his seaside app: > > - to be available in many languages > > - use the browser language as default, but is able to switch language from menu > > > > Some experience to share - some best practices or code? > > > > Thx > > T. > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Sat, Oct 19, 2013 at 10:31 PM, Paul DeBruicker <[hidden email]> wrote: Hi Usman, As I didn't know much about GetText at that time of updating the configuration, I just created a version n +1 that was sufficient. Now, when I see the current baselines of GetText, I see Seaside, Grease, slime, and refactoring browser loading with GetText, which to me is not correct because Gettext does not have any dependency on these projects. I think the reverse is true. So, the current baselines are a bit of an overkill for someone who wants to load GetText without all these projects. Currently, I just have to load GetText for a desktop application and no baseline just simply loads GetText. Although there is a "core" group but debugging that someday can be too complicated. so, I'll add a simple baseline to load GetText only.
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Usman,
Either the 'default' or 'Core' group will loan just the GetText package and ignore the rest. I don't think you should make any changes to it, as it already does exactly what you want. The Seaside-Gettext packages are included there because they were orphaned in the Seaside30Addons repository and not included in the Seaside configuration. The Seaside and Refactoring Browser stuff is listed, but should not be loaded unless a user choose to load the GettextSeaside, GettextExamples, or GettextSlime package. Thanks Paul On Oct 19, 2013, at 1:47 PM, Usman Bhatti <[hidden email]> wrote: > > > > On Sat, Oct 19, 2013 at 10:31 PM, Paul DeBruicker <[hidden email]> wrote: > Hi Usman, > > Yes I saw that the Config you were working from did not have any baselines specified (which I think is not advised) and so chose to use a version that I'd been keeping for myself that did. > > As I didn't know much about GetText at that time of updating the configuration, I just created a version n +1 that was sufficient. > > Now, when I see the current baselines of GetText, I see Seaside, Grease, slime, and refactoring browser loading with GetText, which to me is not correct because Gettext does not have any dependency on these projects. I think the reverse is true. So, the current baselines are a bit of an overkill for someone who wants to load GetText without all these projects. Currently, I just have to load GetText for a desktop application and no baseline just simply loads GetText. Although there is a "core" group but debugging that someday can be too complicated. so, I'll add a simple baseline to load GetText only. > > > > > Paul > > > On Oct 19, 2013, at 1:17 PM, Usman Bhatti <[hidden email]> wrote: > > > Hi Paul, > > > > I see that you have made changes to the configuration of GetText. Now, since you didn't base your changes on the latest version of the configuration (ConfigurationOfGettext-usmanbhatti.5) but instead you chose to modify ConfigurationOfGettext-HilaireFernandes.3 that dates from last year. So, now we have two distinct branches for the configuration of GetText. > > > > I tried to merge the two branches but I cannot because the evolutions of the two branches are non-trivial and distinct. Now, GetText has only one package so I can drop the other branch and use your work but as the branching is not very well-supported by the tools, it would be good to take care of this point in the future. > > > > regards, > > > > Usman Bhatti > > > > > > > > > > > > On Fri, Oct 18, 2013 at 6:11 PM, Paul DeBruicker <[hidden email]> wrote: > > There is a ConfigurationOfGettext here: > > > > http://smalltalkhub.com/#!/~PharoExtras/Gettext > > > > > > I also added a package that uses the Refactoring engine to find all the strings in my program and attempt to detect if they should be translated, then add the necessary methods to do the translation. It works in Pharo 1.3 > > > > > > > > hth > > > > Paul > > > > > > On Oct 17, 2013, at 11:06 PM, Torsten Bergmann <[hidden email]> wrote: > > > > > Hi, > > > > > > If one wants his seaside app: > > > - to be available in many languages > > > - use the browser language as default, but is able to switch language from menu > > > > > > Some experience to share - some best practices or code? > > > > > > Thx > > > T. > > > > > > _______________________________________________ > > > seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Sat, Oct 19, 2013 at 10:55 PM, Paul DeBruicker <[hidden email]> wrote: Usman, Ok. I'll have a look.
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Torsten Bergmann
Torsten wrote:
>If one wants his seaside app: > - to be available in many languages > - use the browser language as default, but is able to switch language from menu > >Some experience to share - some best practices or code? The QCMagritte twitterbootstrap demo does the first, but not the second. I guess getting the default language shouldn't be too difficult. Stephan _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |