# \[ANN\] Swedish Rails

**URL:** <https://www.ruby-forum.com/t/ann-swedish-rails/101216>\
**Category:** Rails\
**Created:** [August 3, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/ann-swedish-rails/101216 "2006-08-03T16:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [August 3, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/ann-swedish-rails/101216/1 "2006-08-03T16:40:11Z")

</div>

I would like to announce my plugin Swedish Rails.

Rails provide many goodies and helpers for you, but some of these are  
dependant on your user interface being in english. Date controls, for  
example. Pluralization is another. And have you ever tried to capitalize  
a string with Swedish letters in them? Then you know it doesn’t work  
that well. Until now, that is. You install this plugin, make sure all  
your Swedish source uses UTF-8, and most of these problems disappear.  
Downcase, upcase, swapcase and capitalize work as expected.  
Integer#ordinalize gives Swedish ordinals. And month names and weekday  
names are in Swedish.

This plugin isn’t only for people looking to create Swedish Web  
interfaces. It can also act as a map for creating a plugin like this for  
any western language. Just replace all the text-strings in this plugin,  
change the module name and you’re set to go. (Of course you’ll have to  
know the language you’re porting too, though).

The plugin can be found at:  
[http://svn.ki.se/rails/plugins/swe\_rails](http://svn.ki.se/rails/plugins/swe_rails)  
and some information here:  
[http://opensource.ki.se/swe\_rails.html](http://opensource.ki.se/swe_rails.html)

## Regards

Ola B. ([http://ola-bini.blogspot.com](http://ola-bini.blogspot.com))  
JvYAML, RbYAML, JRuby and Jatha contributor  
System Developer, Karolinska Institutet ([http://www.ki.se](http://www.ki.se))  
OLogix Consulting ([http://www.ologix.com](http://www.ologix.com))

“Yields falsehood when quined” yields falsehood when quined.

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [August 4, 2006, 5:28am UTC](https://www.ruby-forum.com/t/ann-swedish-rails/101216/2 "2006-08-04T05:28:42Z")

</div>

Ola B. skrev:

> names are in Swedish.  
> [http://opensource.ki.se/swe\_rails.html](http://opensource.ki.se/swe_rails.html)
> 
> Regards

Hej Ola,

Trevligt med en plugin för oss svenskar.

However, there seems to be a problem. I tried to drop the plugin in my  
application to get some Swedish stuff in it but I get a name conflict.

I have a model class named ContentType. You have a class named  
ContentType in the plugin. When I try to use my class it’s not found  
(NameError: uninitialized constant ContentType)

Any work around for this apart from renaming my own class (which is out  
of the question)?

Best regards,

/Marcus

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [August 7, 2006, 4:12pm UTC](https://www.ruby-forum.com/t/ann-swedish-rails/101216/3 "2006-08-07T16:12:34Z")

</div>

On 8/3/06, Ola B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I would like to announce my plugin Swedish Rails.

This might become very useful! Thanks a bunch for this, much  
appreciated!

Tackar!  
Mathias.

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [August 15, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/ann-swedish-rails/101216/4 "2006-08-15T14:22:00Z")

</div>

Marcus A. wrote:

> ContentType in the plugin. When I try to use my class it’s not found  
> (NameError: uninitialized constant ContentType)
> 
> Any work around for this apart from renaming my own class (which is out  
> of the question)?
> 
> Best regards,
> 
> /Marcus

Självklart. Ibland måste man ha saker på Svenska, och då är det bra om  
man kan göra det lätt för sig… =)

However, I’ve fixed it in trunk, renaming the file to  
content\_type\_filter.rb, so if you’ve made it an external, you could just  
svn up and it will work. (I hope… =)

–  
Ola B. ([http://ola-bini.blogspot.com](http://ola-bini.blogspot.com))  
JvYAML, RbYAML, JRuby and Jatha contributor  
System Developer, Karolinska Institutet ([http://www.ki.se](http://www.ki.se))  
OLogix Consulting ([http://www.ologix.com](http://www.ologix.com))

“Yields falsehood when quined” yields falsehood when quined.
