T
Tobin Harris
Hi there,
WARNING: Long-ish post!
I'm about to undertake an ASP.NET project that requires localisation (2
languages initially, then more).
I have read a little about localization, but have never needed to use it
commercially yet. I'm wandering what the best way to approach localization
is from a technical and also non technical point of view. My first thoughts
are these...
It seems to me that I should make it the clients responsibility to update
and add new language versions. This way, I can concentrate on software
issues, leaving them to worry about translation. The main reason for this is
that I don't want to be dragged into hundreds of language iterations of
"tweak resources - update code - review - tweak more"... I can't see how I
can achieve this using the standard resource file approach, my client won't
be able to work with these in their raw format, and there is no instant
feedback cycle to check that things look ok in the app.
A hopefully better option I need to research would be to build special tools
to allow the client to tweak language resources themselves, and see the
changes at run time in the ASP.NET pages. This will probably mean putting
string resources in a database and looking them up dynamically at runtime
(with some caching scheme of course!)
From a developers point of view, a "token" would be assigned to each control
(in the Tag or something ). For example, a "Yes" button might just have the
lookup token "Buttons.Yes". The client can use a tool to lookup this token
and then set the various language strings for it ("Yes", "Ja" or "Ci") for
example. They can then view the changes live, by selecting the appropriate
language.
This raises the question of how the client can know which token corresponds
to which UI control. This could be done by having a few different browse
modes:
- ResourceStringOnly: this is the default mode that is used in the live app.
A button might just show the text "Yes"
- TokensOnly: shows only the token such as "Buttons.Yes" rather than the
lanugage specific string.
- TokensAndResourceStrings: showing both the code and the string for the
currently selected language. E.g "[Buttons.Yes] Yes"
Using TokensOnly, they can see the token that they need to lookup to make a
correction/ammendment.
Now, assuming all this works and can be made performant, I'll be in a
position where the client can look after languages, and I can look after
coding, which hopefully will save me the anticipated pain of having to spend
time with the client worrying about language issues.
I realise there are other issues that I haven't yet considered, such as
string sizes, numerical formatting etc, but if this idea is ok then I can
move on to consider those aspects.
Are my goals naive? Is the solution naive!? Are there tried and tested
methods and tools that just work! Am I re-inventing the wheel? Any thoughts
would be *really* appreciated.
Just in case you're wondering, I'm thinking that 2 things will allow me to
accommodate different string sizes without too much pain:
1 - Keep screens simple, light and roomy
2- Intelligent use or CSS.
3 - We also need to follow W3C accessibility guidelines (priority 1 at
least), and I'm hoping that a simple design will benefit these also.
Hope all that made sense!?
Thanks in advance
Tobin
WARNING: Long-ish post!
I'm about to undertake an ASP.NET project that requires localisation (2
languages initially, then more).
I have read a little about localization, but have never needed to use it
commercially yet. I'm wandering what the best way to approach localization
is from a technical and also non technical point of view. My first thoughts
are these...
It seems to me that I should make it the clients responsibility to update
and add new language versions. This way, I can concentrate on software
issues, leaving them to worry about translation. The main reason for this is
that I don't want to be dragged into hundreds of language iterations of
"tweak resources - update code - review - tweak more"... I can't see how I
can achieve this using the standard resource file approach, my client won't
be able to work with these in their raw format, and there is no instant
feedback cycle to check that things look ok in the app.
A hopefully better option I need to research would be to build special tools
to allow the client to tweak language resources themselves, and see the
changes at run time in the ASP.NET pages. This will probably mean putting
string resources in a database and looking them up dynamically at runtime
(with some caching scheme of course!)
From a developers point of view, a "token" would be assigned to each control
(in the Tag or something ). For example, a "Yes" button might just have the
lookup token "Buttons.Yes". The client can use a tool to lookup this token
and then set the various language strings for it ("Yes", "Ja" or "Ci") for
example. They can then view the changes live, by selecting the appropriate
language.
This raises the question of how the client can know which token corresponds
to which UI control. This could be done by having a few different browse
modes:
- ResourceStringOnly: this is the default mode that is used in the live app.
A button might just show the text "Yes"
- TokensOnly: shows only the token such as "Buttons.Yes" rather than the
lanugage specific string.
- TokensAndResourceStrings: showing both the code and the string for the
currently selected language. E.g "[Buttons.Yes] Yes"
Using TokensOnly, they can see the token that they need to lookup to make a
correction/ammendment.
Now, assuming all this works and can be made performant, I'll be in a
position where the client can look after languages, and I can look after
coding, which hopefully will save me the anticipated pain of having to spend
time with the client worrying about language issues.
I realise there are other issues that I haven't yet considered, such as
string sizes, numerical formatting etc, but if this idea is ok then I can
move on to consider those aspects.
Are my goals naive? Is the solution naive!? Are there tried and tested
methods and tools that just work! Am I re-inventing the wheel? Any thoughts
would be *really* appreciated.
Just in case you're wondering, I'm thinking that 2 things will allow me to
accommodate different string sizes without too much pain:
1 - Keep screens simple, light and roomy
2- Intelligent use or CSS.
3 - We also need to follow W3C accessibility guidelines (priority 1 at
least), and I'm hoping that a simple design will benefit these also.
Hope all that made sense!?
Thanks in advance
Tobin