Hi,
I would like to have an implementation that use only one external file txt for laguage
Thank you
Hi,
I would like to have an implementation that use only one external file txt for laguage
Thank you
Cristiano
cristianodona@gmail.com
Skype: cris-do
That would be amazing.
Can you explain? I think Alpha can already do what you want.
I'm guessing a bit at what you mean here: You can maintain a single external text file that contains all your language translations, and then just feed it to the grids as an override.
Or maybe I don't understand what you want?
-Steve
I'd love to know how to do this--can't speak for Cristiano, but I'm just trying to avoid having to enter the definitions in every grid.
I sell a tool to help with this. Whether you use mine, or build your own, here's an overview of how I go about it:
http://www.workings.com/language_mgr_overview.swf
-Steve
Steve, I've looked at this some a few times since you posted--thanks for that. How does this work with a Tabbed UI? Where do you put the override, and is it still one place or does the override have to be on all a5w pages...?
Hu Guys,
Sorry Steve, But I do not never received your first post, just the christappan post. Let me explain.
With Alpha five I need to make for every grid my laguages definition . If we could use an external text file for each grid , and just call these language definitions If I write the code on my grid <a5:r> Lastname</a5:r> With alpha five I need to replicate all my definition languages for all my grid.
If I use a db( like your sample or and external txt file with all language definitions I think is more easy
Cristiano
cristianodona@gmail.com
Skype: cris-do
Hi Steve,
If I wanted to translate some words on a web pages , not inside a web componet I can use the same the tags <a:r5></a:r5> and this translation where I need to insert ? If I using an external txt file ( or db) with all my translations it would be more easy
Cristiano
cristianodona@gmail.com
Skype: cris-do
The tags only work in the grid. They may be adding them for other components in V11 - I don't know - but you'd need some A5 component to do the job. I suppose you could write an Xbasic function that did this on a page. But instead of doing this, it might be easier to just convert your page into a grid configured to look like "just a page" and let the A5 engine do the work.
-Steve
Ok, Thank you Steve. I have in mind to try to make an external file with all my definition languages , but it might be easy convert the page , but I don't know convert . how I do that ?
Cristiano
cristianodona@gmail.com
Skype: cris-do
How does this work with Tabbed UIs? The grids called from Tabbed UI buttons are part of of the Tabbed UI page but aren't changed by my attempts, e.g.:
language.a5w:
then in the Tabbed UI Properties "User defined 'head' content":Code:<%a5 dim pageVar as p pageVar.lang = "<a5:r>ISC</a5:r>=\"CM\"" %>
It's not changing the word ISC to CM on a language-tagged frame label in the Tabbed UI menu nor the language-tagged HTML in the components opened from the Tabbed UI. Am I still missing something?Code:<%a5 a5w_include("Language.a5w") tmpl.override_settings = <<%override_settings% languageDefinition = pageVar.lang %override_settings% %>
Thank you Christappan
Cristiano
cristianodona@gmail.com
Skype: cris-do
Did you figure it out Cristiano? I got most of what I wrote in my post from Steve's video link above, but it's NOT working on Tabbed UIs... still trying...
I think yes, I just need studying better the video
Cristiano
cristianodona@gmail.com
Skype: cris-do
Thanks to others on the board, Steve's video, and some other snippets, we finally figured this one out, so I thought we'd share this for anyone else who can find all the pieces but not the whole thing like us...
We created a SQL table with the following form:
The Lang_ID is what defines what language you're using, the Def column is the string in <a5:r></a5:r> tags throughout your application, and the Val is what will appear to the user.Code:ID | Lang_ID | Def | Val 1 | 1 | Customer | Customer 2 | 2 | Customer | Client 3 | 2 | Company | Business 4 | 1 | Company | Company
We set the session.__protected__language just after login--you may be able to use something else--but it's a numeric value based on the language setting for that user.
Then we're using the following code in the OnGridInitialize Event of each grid (we actually put this in a function for greater ease, but the point is that the final value is the e.tmpl.languageDefinition):
Assuming a session.__protected__language value of 2, this ends up like this:Code:dim language as c dim cn as sql::connection dim sqlCommand as c dim args as sql::arguments dim rs as sql::ResultSet args.add("Lang_ID",session.__protected__language) cn.open("::Name::SQL Server Express") cn.execute("SELECT def,val FROM language_definition WHERE languageID = :Lang_ID",args) rs = cn.ResultSet WHILE rs.nextRow() language = language + "<a5:r>" + rs.data("def") +"</a5:r>=\"" + rs.data("val") + \""+crlf() END WHILE e.tmpl.languageDefinition = language
...and that changes all the text in <a5:r></a5:r> tags to whatever is in the tables. You don't have to do the language definitions at the grid level--just one place in your tables. And this is structured for an infinite number of languages as long as you make sure there's a def and val for each tagged string for each language.Code:e.tmpl.languageDefinition = <a5:r>Customer</a5:r>="Client" <a5:r>Company</a5:r>="Business"
Last edited by christappan; 06-15-2011 at 11:53 PM. Reason: languageDefinition (not activeLanguage)
Thank you christappan,
This is exactly what I designed. We are in full agreement, even though we are thousands of miles away.
regards
Cristiano
cristianodona@gmail.com
Skype: cris-do
Bookmarks