How to show language dependent text in a Table Box?

munson
Member Posts: 4
Hi,
I have a Table Box that consist of name/value pairs (two columns) and I need to show the name column in the table in different languages depending on the users language. Normaly (in VB6, .NET, basically anything other than Navision) I have a ID column for the name and I exchange that with the values stored in a lookup table in my SQL statment that fetch the data and bind to the resulting RecordSet or DataSet to the grid.
Is there any way in Navision to show a column from another table in a Table Box than the one defined in SourceTable? Is there some other way to make the content of a column be translated to the language in use?
I have a Table Box that consist of name/value pairs (two columns) and I need to show the name column in the table in different languages depending on the users language. Normaly (in VB6, .NET, basically anything other than Navision) I have a ID column for the name and I exchange that with the values stored in a lookup table in my SQL statment that fetch the data and bind to the resulting RecordSet or DataSet to the grid.
Is there any way in Navision to show a column from another table in a Table Box than the one defined in SourceTable? Is there some other way to make the content of a column be translated to the language in use?
0
Comments
-
Please keep in mind that the SourceExpr(ession) for a text box does not absolutely need to be a field in the SourceTable: any expression that evaluates to a type that the tablebox/textbox controls can display will do.
If I understand you correctly, you want to build a form that looks a bit like the Properties window in C/SIDE, but with language-dependent property names. I think I'd write a function in the SourceTable that retrieves the left-column value from a table with translated descriptions, and use that function as the SourceExpr for you left-hand column text box.Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
Thanks jhoek, what you are suggesting seem to be the perfect solution to my problem. I Appreciate the quick anwser!0
-
I think I am missing something, but can't you use the CaptionML property for this? For the standard app, there should be files wth all the known captions, but for custom fields you can enter the translations of the field caption in the CaptionML field property.0
-
I believe the original question is about "ML-enabling", not field names?!
Imagine the Properties window in C/SIDE supporting property names in the current application language - that's the effect that munson is trying to achieve, if I'm not mistaken.Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
Another suggestion: if the names in the name/value-pairs are known, you could make the Name column an option field, and insert a record in the table for each option in the field. Doing it like that, you'll benefit from the fact that option fields can be made ML-enabled by setting the OptionCaptionML property.Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
Oh ok, so instead of having one value with different language field captions, you have different records with different names AND values. Can't you simply add a language column and filter on the user's language?0
-
I think each line represents one value (just like the Properties window), whose name can be presented in a number of languages, but always in one language at a time. The value will probably remain the same, regardless of the language chosen. That's why I believe you should have one record for each name/value-pair, and change only the presentation of the name if the user switches to another language.
So:
Column "Name": Height
Column "Value": 20
or
Column "Name": Hoogte
Column "Value": 20
or
Column "Name": Hoehe
Column "Value": 20Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
I must admit that jhoek is better at explaining what I want to do than I am
I have implemented his first suggestion with using a function in the SourceExpr and it works just as I wanted. Another good thing about that solution is that it keeps the amount of data down since it does not store the same texts over and over. I will stick to this solution.0 -
So in order to link the word 'hoogte' to the language Dutch as opposed to the word 'hoehe' to German, you need to have a way to do that. I am curious to know if not in a field that designates the language of the "name" column, how are you going to do that then? How does the system know to display the word 'hoogte' when it determines that the user has their computer set up to be Dutch?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions