[web2py] Re: translating the views
ok,an interface in the backoffice for people to translate is not hard, and I can embed a javascript editor so that they can use strong, em, bullets, etc! But then: how would you plug the other traslation engine into that one? I don't want to keep two separate things. Would you just copy-paste-modify the code in the admin app? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
Just a shortcut for {{=MARKMIN(T('**bold** this text'))}} ?? Any other advantage? El miércoles, 1 de octubre de 2014 18:52:43 UTC+2, lyn2py escribió: Translation Markmin is available. T.M('**bold** this text') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
Well you need to have separate things for things that are different. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
I think you shouldn't use the built in translation for big static texts. Static texts should be in the db in their different language versions and then you can pick the correct one using T.accepted_language. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
Let me check if I got your idea: You mean I should create a table (slug,lang)-text db.define_table('texts', Field('slug', 'string'), Field('language', 'string'), Field('text', 'text') ) and then use it in controllers and views like this: def my_controller(): ... return dict(form=form, text1=db.text(slug='info_help'), ) {{=form}} {{}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
That seems like a good solution. And yes you will need to make an interface in the backoffice for people to translate. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: translating the views
Translation Markmin is available. T.M('**bold** this text') On Wednesday, October 1, 2014 6:03:44 PM UTC+8, Pablo Angulo wrote: I sometimes find very inconvenient the translate feature. Some views contain a lot of static text, so if I want to translate it I would do: p{{=T('I sometimes find very inconvenient the translate feature. Some views contain a lot of text, so if I want to translate it I would do:')}}/p but if there are other html tags, I have to choose between: {{=T('''pSome strongimportant/strong text and other liemphasizes/li items./p pAnother paragraph/p pand the last one/p''')}} which is not ideal because any translator can break the DOM correctness of the page for just one language, or p{{=T('Some')}} strong{{=T(''important'')}}/strong ... which is cumbersome, and the complete sentence may not make sense at all if the pieces are translated at random order. I'm considering using MARKMIN, so the view would be: {{=MARKMIN(T(''' # Title this is **bold** or ''italic'' and this [[a link http://web2py.com]] '''))}} But before I dive deeper: what do you think? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.