Welcome Guest, Not a member yet? Register   Sign In
How do you i18n?
#7

[eluser]xwero[/eluser]
The way i do it is to put static and semi-static sentences/words in one or more language files. With semi-static i mean a sentence that has a few variables: "[0]'s won the [1] prize".
Sentences/long texts that are generated by the user i store in the database. I split my tables in a language independent and a language dependent part.
Code:
blog
  id
  entry_date
  author
blog_text
  blog_id
  title
  url
  content
  language
This makes it possible to add/remove languages in the future.

I match the language directory names with the content in the language field. I found out users don't like to translate, even if they insist on a multi language site, so i don't specify the language subgroup.

Hardcoding strings is one of the minor points about CI for me. I can forgive that development messages (library missing, error in the sql query, ...) are hardcoded because only developers will see them but then again you never know what can happen. If they let the hardcoded developer messages in they should create an error message routine that makes a difference between developer and user messages.


Messages In This Thread
How do you i18n? - by El Forum - 02-25-2008, 05:07 PM
How do you i18n? - by El Forum - 02-25-2008, 05:19 PM
How do you i18n? - by El Forum - 02-25-2008, 05:31 PM
How do you i18n? - by El Forum - 02-25-2008, 05:44 PM
How do you i18n? - by El Forum - 02-25-2008, 06:04 PM
How do you i18n? - by El Forum - 02-25-2008, 07:16 PM
How do you i18n? - by El Forum - 02-26-2008, 02:01 AM
How do you i18n? - by El Forum - 02-26-2008, 04:32 AM
How do you i18n? - by El Forum - 02-26-2008, 06:30 AM
How do you i18n? - by El Forum - 03-04-2008, 11:40 AM
How do you i18n? - by El Forum - 03-15-2008, 12:18 PM
How do you i18n? - by El Forum - 03-15-2008, 02:36 PM
How do you i18n? - by El Forum - 03-16-2008, 03:49 AM
How do you i18n? - by El Forum - 03-19-2008, 07:42 AM
How do you i18n? - by El Forum - 03-19-2008, 10:41 AM
How do you i18n? - by El Forum - 03-19-2008, 05:23 PM
How do you i18n? - by El Forum - 03-26-2008, 08:49 AM
How do you i18n? - by El Forum - 05-31-2008, 08:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB